Newbie question:Switch to another tab of a form?

_Nickel_

Registered User.
Local time
Today, 13:25
Joined
Nov 11, 2003
Messages
31
I am making hardware & software inventory database. All my forms are subforms on different tabs of one main form.
What I want to do is use an event procedure to switch to another tab (and thus form) and open up a record corresponding to the currently open record in the current form.
I am currently using this code that opens up the form that I want to switch in a new window (instead of switching to another tab):

Private Sub Form_DblClick(Cancel As Integer)
DoCmd.OpenForm "Frm_Software", , , "[SoftwareID]=" & Me.SoftwareID
End Sub

Can anyone tell me the statement I need to use to open another tab instead of another form?

Thx!
 
Thanks, now I need to get to the corresponding record as the "where" command of the DoCmd.OpenForm works only if I use DoCmd.OpenForm :(

This is what I tried but it doesn't work:

Private Sub SoftwareIDfk_DblClick(Cancel As Integer)

Dim buffer As String
Dim rst As Recordset

buffer = Form_sfrmSoftware.SoftwareIDfk.Value
Form_frmMain.frmSoftware.SetFocus
Me.SoftwareID.SetFocus
DoCmd.FindRecord FindWhat:=buffer
Form_frmSoftware.Refresh

End Sub

:(

What did I do wrong? :confused:

Please help. Thanks.
 

Users who are viewing this thread

Back
Top Bottom