Date Help

ChrisDo11

Registered User.
Local time
Today, 17:45
Joined
Jan 21, 2003
Messages
69
I have a form which is based on a query. When entering the form you are prompted for a job #. Once you enter the job # the form queries all the records base on this job #. The result is that I get anywhere from 2 to 102 pages in my form. I want the date to show up on each page which will then be entered into the query the form is base on and then into the table the query is based on. I can do this with a macro and having it set the date when I click through the pages, but I would like to be able to hit "Print All" and have the date automatically put into all the pages without having to click my way through all of them.

Is this possible???

Thanks.
 
Chris,

After you get the JobNumber:

' ***********************
Dim dbs As Database
Dim sql As String
sql = "Update YourTable Set YourDate = #" & Date & "# " & _
"Where JobNumber = " & Me.JobNumber & ";"
dbs.Execute(sql)
' ***********************

Note: Depending on your date field, you might use Now() instead
of Date. Also assumed that JobNumber is numeric.

Then run your form query.

hth,
Wayne



I have a form which is based on a query. When entering the form you are prompted for a job #. Once you enter the job # the form queries all the records base on this job #. The result is that I get anywhere from 2 to 102 pages in my form. I want the date to show up on each page which will then be entered into the query the form is base on and then into the table the query is based on
 
where do i put this code?

Sorry... i don't work in access much....
 

Users who are viewing this thread

Back
Top Bottom