Automagically inserting values

ianforest

Registered User.
Local time
Today, 06:33
Joined
Oct 14, 2003
Messages
17
Hi there,

I have added a "record notes" table to my access application. Basically, when someone clicks on the "add note" button on the main form, a form will open allowing them to add notes for that particular record.

I've done the table, the relationship, and the form, however I need to auto-populate it with some data.

First I need to create a new record in the notes table (i've done that)
Then I need to add the record no. from the previous form (I don't know how to do that)
Then I need to automatically add the date into the date field (I thought I knew how to do that but it didn't work)

Here's the code i've used so far using the "On Open" event for the form...

Code:
Private Sub Form_Open(Cancel As Integer)

    DoCmd.GoToRecord , , acNewRec
    Me.Form.Date = Date

End Sub

Obviously, this is right at the very beginning...so how do I do this? Any pointers?

Many thanks!
 

Users who are viewing this thread

Back
Top Bottom