Main Form and SubForms

rui_jc

Registered User.
Local time
Today, 20:28
Joined
Aug 17, 2005
Messages
10
Greetings to all,

I have a main form working with one invisible subform in the background that is linked by CarID field and i need to order by code in the main form to add a new record to the subform.

The idea is this:

1- When "new record" button is pressed in main form and typed the carID field, the subform searches for a specific record in it's table.

'in the subform
Private Sub carID_AfterUpdate()
DoCmd.FindRecord Me.carID, , , acDown, , acCurrent
End Sub

2- When typing on a specific field #1 on the main form, the subform will write the date on the selected record .

'in the main form
Me.Form![HTF]![endDate] = Now()

3- When typing on a specific field #2 on the main form, the subform will save the current record and add a new one with the same ID but with blank endDate.

'in the main form
????

I cannot order it by code by the main form to go to a new record!
Is because they are linked?
Is it possible to do it?

Many thanks
 

Users who are viewing this thread

Back
Top Bottom