I have a multiple form project, I get a Run-Time 91 Error on the "Set pstrCurrent" line. Can someone help me figure this out. I have been struggling with this for days now...
Thanks in advance.
Private Sub cmdSelect_Click()
Dim pstrSQL As String
Dim pstrFROM As String
Dim pstrFields As String
Dim pstrCurrent As Recordset
Dim pstrWHERE As String
Dim pstrORDERBY As String
Dim dbcurrent As Database
pstrFields = " *"
pstrFROM = " FROM tblCustomer"
pstrWHERE = " WHERE fldCustomerID =" & frmCustomerSelect.txtCustID.Text
pstrSQL = " SELECT" & pstrFields & pstrFROM & pstrWHERE
Set pstrCurrent = dbcurrent.OpenRecordset(pstrSQL)
MsgBox pstrSQL
frmtblCustomers.Show
Thanks in advance.
Private Sub cmdSelect_Click()
Dim pstrSQL As String
Dim pstrFROM As String
Dim pstrFields As String
Dim pstrCurrent As Recordset
Dim pstrWHERE As String
Dim pstrORDERBY As String
Dim dbcurrent As Database
pstrFields = " *"
pstrFROM = " FROM tblCustomer"
pstrWHERE = " WHERE fldCustomerID =" & frmCustomerSelect.txtCustID.Text
pstrSQL = " SELECT" & pstrFields & pstrFROM & pstrWHERE
Set pstrCurrent = dbcurrent.OpenRecordset(pstrSQL)
MsgBox pstrSQL
frmtblCustomers.Show