[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

11/05/2009 at 01:59PM PST, ID: 24876269 | Points: 500
[x]
Attachment Details

Reading empoy number from query and writing the date to table

Asked by LillyC in Access Coding/Macros, SQL Query Syntax

Hi Experts,

I have a report based on 7 day reminder query that flags all the people that have 7 days or less to go to the course.  I need to open query via the VBA code, pick up their employ numbers and then write to the Course Table under their particular record the exact date of reminder (Now) in 7 days reminder field.  How do I do that?

P.S.  I have managed to open the query thus far (see code below).  For some reason it only picks up the last employer number although there is more than one? Should I be doing this in Repot_Load subroutine?

LillyC
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
Private Sub Report_Load()
 
Dim i, count As Integer
Dim emp_number()
 
count = DCount("*", "7 day reminder query") - 1
ReDim emp_number(count)
 
Set rs = CurrentDb.OpenRecordset("7 day reminder query")
 
i = -1
 
rs.MoveFirst
 
Do Until rs.EOF
i = i + 1
 
    emp_number(i) = Employ
 
rs.MoveNext
Loop
 
 
 
End Sub
[+][-]11/05/09 02:31 PM, ID: 25754818

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/11/09 11:08 AM, ID: 25797960

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/11/09 11:33 AM, ID: 25798170

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625