D
DS
I have a Form that I'm opening from another Form...Its suppose to open a
New Record which it does if the SalesID is Null. The SalesID is in a
listbox column 3...this works fine, what doesn't work is that whenever I
want to go to a record that I choose on the first form, it doesn't go
there, it goes to the first record in the set. Heres my code, did I do
something wrong?
Private Sub TableNum_Click()
If IsNull(Me.TableNum.Column(2)) Then
DoCmd.OpenForm "Sales", acNormal, "", "", , acNormal
DoCmd.GoToRecord acForm, "Sales", acNewRec
Forms!Sales!Server = Forms!Tables!Text16
Forms!Sales!GetTableNum = Forms!Tables!TableNum
DoCmd.Close acForm, "Tables"
DoCmd.OpenForm "Menus", acNormal, "", "", , acNormal
Else
DoCmd.OpenForm "Sales", acNormal, "",
Forms!Tables!TableNum.Column(2), acFormEdit
End If
End Sub
Its the last line before the end if
Thanks for any help or suggestions
DS
New Record which it does if the SalesID is Null. The SalesID is in a
listbox column 3...this works fine, what doesn't work is that whenever I
want to go to a record that I choose on the first form, it doesn't go
there, it goes to the first record in the set. Heres my code, did I do
something wrong?
Private Sub TableNum_Click()
If IsNull(Me.TableNum.Column(2)) Then
DoCmd.OpenForm "Sales", acNormal, "", "", , acNormal
DoCmd.GoToRecord acForm, "Sales", acNewRec
Forms!Sales!Server = Forms!Tables!Text16
Forms!Sales!GetTableNum = Forms!Tables!TableNum
DoCmd.Close acForm, "Tables"
DoCmd.OpenForm "Menus", acNormal, "", "", , acNormal
Else
DoCmd.OpenForm "Sales", acNormal, "",
Forms!Tables!TableNum.Column(2), acFormEdit
End If
End Sub
Its the last line before the end if
Thanks for any help or suggestions
DS