View Single Post
  #1 (permalink)  
Old May 14th, 2004, 01:06 PM
compcad compcad is offline
Registered User
 
Join Date: May 2004
Location: HILLSBORO, OREGON, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default RUN TIME ERROR 91

I had created a back end program for my clients program it works fine as a stand alone program. my client wants this back end to be only open from his program. I then created code to pass arguments to the back end. I have compiled the back end and ran the program from the front end. The back end would load MINIMIZED on the task bar and when I tried to MAXIMIZE the back end from the task bar I would get an error [Run time ERROR 91]. I need some help with this error here is some of the code i think the error is coming from.

CODE
Code:
Code:Private Sub Form_Activate() 

Dim strValuesFromCommandLine() As String 
Dim CmdLine As String 
Dim RAFFLEID As String 
Dim PASSWORD As String 
Dim FirstTicketNo As String 
Dim LastTicketNo As String 
Dim number1 As String 

 strValuesFromCommandLine() = Split(Command$, ", ") 
 CmdLine = strValuesFromCommandLine(0) 
 RAFFLEID = strValuesFromCommandLine(1) 
 PASSWORD = strValuesFromCommandLine(2) 
 FirstTicketNo = strValuesFromCommandLine(3) 
 LastTicketNo = strValuesFromCommandLine(4) 

If PASSWORD = "TheSecretPassword" Then 
    If RAFFLEID > " " Then 

        'Enter RaffielD into textbox and press OK. 

        Data1.DatabaseName = DataPath 
        Data1.Connect = "; PWD=TheSecretPassword" 
        number1 = "select RaffieID, Prize1, NumberofTicketsAvailable, shortdescription, longdescription, raffleenddate, Ticketcost, " & _ 
        "Timeplace, CharityName from raffies Inner Join charity on Raffles.CharityIdd = charity.CharityId Where RaffielD like'" & RAFFLEID & "*'" 
        Data1.RecordSource = number1 
        Data1.Refresh 
        Data1.Recordset.FindFirst "RaffleID = '" & RAFFLEID & "'" 
    ElseIf Data1.Recordset.NoMatch Then 
        Frame3.Visible = True 
        Label4.Visible = True 
        Label4.Caption = "No such record was found." 
        End 
        End If 
ElseIf PASSWORD <> " TheSecretPassword" Then 
    Label4.Visible = True 
    Label28.Visible = False 
    Label29.Visible = False 
    Label4.Caption = "Enter the correct PASSWORD or see the administrator." 
End If 


DataPath = Mid(App.Path, 1, 29) & "rmdesktop\whdata.mdb" 
DataPath1a = Right(DataPath, 11) 

If Option2 = False Then 
    txtValue.Enabled = False 
    Text2.Enabled = False 
    cmdPrint_Singles.Enabled = False 
End If 

If Option1 = False Then 
    cmdPrint_All.Enabled = False 
End If 

End Sub
THANK YOU

If you need any more information I will get it to you
Reply With Quote