D
David P.
I have a form with a combo box and a button on it. When
the user pushes the button I want a new form to open with
the record that is selected in the combo box. I have that
working fine. If the combo box is blank the new form
opens on a blank record, I would like a message box to pop
up if there is no record in the combo box. Here is what I
have coded but it is not working, I am getting a run-time
error '424': Object Required. Here is teh code I am
using...
Me.cboMachineNumber.SetFocus
If Me.cboMachineNumber.Value Is Not Null Then
DoCmd.RunMacro "mcro_OpenMachineHyperlinks"
Else
MsgBox "You must select a Machine Number"
End If
I also tried this code...
Me.cboMachineNumber.SetFocus
If me.cboMachineNumber.Value = "" then
MsgBox "You must select a Machine Number"
Else
DoCmd.RunMacro "mcro_OpenMachineHyperlinks"
End If
Anyone know what I am doing wrong????
the user pushes the button I want a new form to open with
the record that is selected in the combo box. I have that
working fine. If the combo box is blank the new form
opens on a blank record, I would like a message box to pop
up if there is no record in the combo box. Here is what I
have coded but it is not working, I am getting a run-time
error '424': Object Required. Here is teh code I am
using...
Me.cboMachineNumber.SetFocus
If Me.cboMachineNumber.Value Is Not Null Then
DoCmd.RunMacro "mcro_OpenMachineHyperlinks"
Else
MsgBox "You must select a Machine Number"
End If
I also tried this code...
Me.cboMachineNumber.SetFocus
If me.cboMachineNumber.Value = "" then
MsgBox "You must select a Machine Number"
Else
DoCmd.RunMacro "mcro_OpenMachineHyperlinks"
End If
Anyone know what I am doing wrong????