Here's the code calling the method:
Private Sub btnNewIncident_Click() DoCmd.OpenForm "frmIncident", , , , , , "New" End Sub
I actually can't get the form to load at all, it's weird. If I do just DoCmd.OpenForm "frmIncident" and comment out the entire Form_Open sub, it still gives me the same error.
Actually, just tried it again entirely removing the Form_Open sub and now it loads. If I change it to Form_Load it doesn't seem to run any of the code in the method though. Here's my open function.
Private Sub Form_Open(Cancel As Integer) '----------------------------------------------------------------------------- 'This will run every time the form is Opened, 'and should determine what to do with it from the strArgs String. 'This is how we make the form dynamic. '----------------------------------------------------------------------------- Dim strArg As String 'arguments passed to the form Dim boolLoad As Boolean 'this will be used to stop the form from loading strArg = Me.OpenArgs boolLoad = True 'check what we're being told to do when we open the form. If strArg = "New" Then LoadNew 'we're creating a new incident, run the LoadNew function If strArg = "Remedy" Then boolLoad = LoadRemedy 'we're going to open an incident by it's remedy ticket # If strArg = "LastCreated" Then boolLoad = LoadLastCreated 'we're going to open the last ticket created by the user If Not boolLoad Then DoCmd.Close End SubI can't see where it's failing out. LoadLastCreated and LoadRemedy are bools that return true if they succeed in building the form.
Is there a reference or something I might be missing that's necessary for this to run properly?

New Topic/Question
Reply



MultiQuote



|