problem with tab and subform.. (1 Viewer)

redblaze

Registered User.
Local time
Today, 23:48
Joined
Jan 12, 2002
Messages
54
hi i have a fairly complex problem which probably has a really simple answer, but i cant figure it out.

ok..i have a switchboard, in which there is a tab. each page in the tab has a subform. the thing i need to happen is when the user clicks a button on the switchboard, it goes to a new record in a subform on a particular page.

the code i have right now is:

Private Sub cmdAddCustomer_Click()
Customer.SetFocus
sfCustomer.SetFocus
DoCmd.GoToRecord acDataForm, "sfCustomer", acNewRec
End Sub

the customer.setfocus goes to the customer tab..
the object sf Customer is the subform, and i need to get to a new record on this. is there any way?


another thing that has me baffled is how i can search for records using the find record in a subform on a tab?

can anybody help please!
thanks!!
 

Haitham

Registered User.
Local time
Tomorrow, 01:48
Joined
Oct 27, 2002
Messages
17
Hope That Helps

Dear Friend,

Private Sub cmdAddCustomer_Click()
Me.sfCustomer.Form.Recordset.AddNew
[sfCustomer].Form![Customer].SetFocus
End Sub

Hope That Helpful

Haitham
 

Users who are viewing this thread

Top Bottom