zdunham
09-23-2008, 11:33 AM
Hi, I have a button with this VBA code executed on click:
Private Sub Command4_Click()
Dim inputString As String
inputString = InputBox("Enter System Name: ")
If inputString = "" Then
DoCmd.OpenForm "MainForm", , , , acFormEdit
Else
DoCmd.OpenForm "MainForm", , , "SName = '" & inputString & "'", acFormEdit
End If
End Sub
The button is clicked when the user wants to edit a system rather than
make a new one. The problem here is that a second InputBox pops up
after the first one asking for Model.Brand. Where else could code be
executed that would make that pop up? There is a model table and a
brand table that are both used to generate drop-down lists and the
selection is saved in the system table with referential integrity to
the other tables. Model and Brand tables are not related. Thanks for
any help.
Private Sub Command4_Click()
Dim inputString As String
inputString = InputBox("Enter System Name: ")
If inputString = "" Then
DoCmd.OpenForm "MainForm", , , , acFormEdit
Else
DoCmd.OpenForm "MainForm", , , "SName = '" & inputString & "'", acFormEdit
End If
End Sub
The button is clicked when the user wants to edit a system rather than
make a new one. The problem here is that a second InputBox pops up
after the first one asking for Model.Brand. Where else could code be
executed that would make that pop up? There is a model table and a
brand table that are both used to generate drop-down lists and the
selection is saved in the system table with referential integrity to
the other tables. Model and Brand tables are not related. Thanks for
any help.