Date Stamp

  • Thread starter Thread starter learning_codes
  • Start date Start date
L

learning_codes

Hi,

I created a form link to one Query (Union Query). I want to create a
date when open the Union Query and create a date that I already look
the query. I couldn't create a date because of Union Query. Can you
help me how to set a button to open the query and send a date and type
of a letter code into the new table. The new table will have:

LetterCD
Letter
Date

Union Query has a field called Letter CD. I want to create a report
that pull all the information to link a new table that has
"LetterCD".

I need your help with this.

Thanks
 
What you want to do is you want to link the union query and the new table
(via LetterCD) in the form RecordSource. Then you want to bring in the
fields Letter and Date from the new table and any fields that you want from
the union query in the form RecordSource. Then pull in all the fields from
RecordSource on the form.

After that, go to the BeforeUpdate event in the form properties and select
Code Builder to open the Visual Basic (VB) window. In the VB window "Private
Sub Form_BeforeUpdate(Cancel As Integer)", type in the code below:

Me.[Date Field from New Table].value = Now()

After those steps, when the form is opened, the date field on the form and
in the new table will be populated with current date. As far as the letter
field that you mentioned, I wasn't quite sure where you would get the
information to populate the information.

I hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top