Morning all,
I have a function that validates some info, and returns a true or false depending on whther the info was good. If true, the form saves, if false it doesn't. This is the call to the function - which works but is ugly as hell and never seems to get to the "Call" part. Is that line superfluous after the x= line?
I guess I shouldn't worry since it works, but I'm not good at passing things back and forth and I'd like to understand a little better.
'validates, and saves the form if ok.
Dim x As Byte
x = PrepSaveValid(formname)
If x = False Then
Exit Sub
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End If
Call PrepSaveValid("frmPrepItem")
Thank you!
Jennifer
I have a function that validates some info, and returns a true or false depending on whther the info was good. If true, the form saves, if false it doesn't. This is the call to the function - which works but is ugly as hell and never seems to get to the "Call" part. Is that line superfluous after the x= line?
I guess I shouldn't worry since it works, but I'm not good at passing things back and forth and I'd like to understand a little better.
'validates, and saves the form if ok.
Dim x As Byte
x = PrepSaveValid(formname)
If x = False Then
Exit Sub
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End If
Call PrepSaveValid("frmPrepItem")
Thank you!
Jennifer