Would like to solve this using the macrobuilder because I don't know VBA and due to time constraints don't really have time to learn it. If one could help me figure out whats wrong with my macro, or help me make a new one, or even just adapt a code in VBA to my specified fields/controls/form and walk me through it that would be most appreciated.
The problem I'm having in Form_Before_Update is that if the first field is filled, but the second isn't, it will still allow the record to be "saved" upon "Submit Request" (Macro- Go To- New Record ). If both fields Is Null, nothing will happen upon pressing the "Submit Request" button. If only the SECOND field ([Sort #]) is Is Not Null, but the first field ([Requestor]) is Null, it will prompt: (MsgBox) "Please fill in the Requestor field," (press ok) then ANOTHER MsgBox prompt (information error) "You cannot go to the specified record: You may be at the end of a record set", crash the "Submit Request" button "frmNewPartsRequest : Submit Request btn : OnClick : Embedded Macro. Action Name: GoToRecord Argument-1, New.... [Stop All Macros]
This is my exact Form_Before_Update macro, maybe there is something wrong with it:
If Forms![frmNewPartsRequest]![Requestor]! Is Null Then
Cancel Event
Msg Box - "Please fill in the Requestor field"
Go To - Control Source - Requestor
-If Forms![frmNewPartsRequest]![Sort #]! Is Null Then
Cancel Event
Msg Box - "Please provide the Sort #"
Go To - Control Source - Sort #
Here is my Control_Button on the form:
(Macro) Go To - Record - New
How do I get the "GoTo-Record-New" to stop crashing if a field is null, and apply the timestamp in the Before_Update? I've tried pasting this macro in the form/control/before_update/after_insert and have run into the issue several times over.
Thanks!
The problem I'm having in Form_Before_Update is that if the first field is filled, but the second isn't, it will still allow the record to be "saved" upon "Submit Request" (Macro- Go To- New Record ). If both fields Is Null, nothing will happen upon pressing the "Submit Request" button. If only the SECOND field ([Sort #]) is Is Not Null, but the first field ([Requestor]) is Null, it will prompt: (MsgBox) "Please fill in the Requestor field," (press ok) then ANOTHER MsgBox prompt (information error) "You cannot go to the specified record: You may be at the end of a record set", crash the "Submit Request" button "frmNewPartsRequest : Submit Request btn : OnClick : Embedded Macro. Action Name: GoToRecord Argument-1, New.... [Stop All Macros]
This is my exact Form_Before_Update macro, maybe there is something wrong with it:
If Forms![frmNewPartsRequest]![Requestor]! Is Null Then
Cancel Event
Msg Box - "Please fill in the Requestor field"
Go To - Control Source - Requestor
-If Forms![frmNewPartsRequest]![Sort #]! Is Null Then
Cancel Event
Msg Box - "Please provide the Sort #"
Go To - Control Source - Sort #
Here is my Control_Button on the form:
(Macro) Go To - Record - New
How do I get the "GoTo-Record-New" to stop crashing if a field is null, and apply the timestamp in the Before_Update? I've tried pasting this macro in the form/control/before_update/after_insert and have run into the issue several times over.
Thanks!