Hi Every Body
Is it possible to Execute 2 Events by one Button?
Let me Explain a Little, I have a Form and a in it a Subform, My sub Form is in DataSheet View, and There is a Master and Child Link Field between the 2 Forms.
On My sub form there are 2 Text Boxes,
I removed my Navigation Buttons from my Form and I Put my Own Navigation Buttons,
There is also a Button on My Form that refreshes my Subform.
Here is the Challenge I want to be able by pushing for Example my Add New Button on My form, First of all the Refresh Button to be Pushed and Then Run the Following Sub:
Private Sub Command108_Click()
If Me!Sd <> Me!SC Then
MsgBox "Entries are out of Balance", vbOKOnly, "Inventory101"
Else
DoCmd.GoToRecord , , acNewRec
End If
End Sub
Where SD and SC are two Text Boxes on My Original form Equal to Exact same Name Text Boxes on my Sub Form, which they are the Sum Of My 2 Text Boxes on the Sub Form.
Is it Possible?
If You want to Put My Refreshing Button Code in My add new Button Code is fine
Best Regards
sanan
Is it possible to Execute 2 Events by one Button?
Let me Explain a Little, I have a Form and a in it a Subform, My sub Form is in DataSheet View, and There is a Master and Child Link Field between the 2 Forms.
On My sub form there are 2 Text Boxes,
I removed my Navigation Buttons from my Form and I Put my Own Navigation Buttons,
There is also a Button on My Form that refreshes my Subform.
Here is the Challenge I want to be able by pushing for Example my Add New Button on My form, First of all the Refresh Button to be Pushed and Then Run the Following Sub:
Private Sub Command108_Click()
If Me!Sd <> Me!SC Then
MsgBox "Entries are out of Balance", vbOKOnly, "Inventory101"
Else
DoCmd.GoToRecord , , acNewRec
End If
End Sub
Where SD and SC are two Text Boxes on My Original form Equal to Exact same Name Text Boxes on my Sub Form, which they are the Sum Of My 2 Text Boxes on the Sub Form.
Is it Possible?
If You want to Put My Refreshing Button Code in My add new Button Code is fine
Best Regards
sanan