Hello all.
Currently I am still useing access97 (sad I know) and I can not seem to get this dlookup function in my vb code to work. I keep getting a type mismatch error when I run the code. I am sure it is my formating of the line but cant seem to get it right. I verified my fields are all the correct data type.
Dim FirstQin As Long
Dim FrmDate As Date
Dim frmShp As String
FrmDate = [Forms]![Main Form]![tempDate]
frmShp = [Forms]![Main Form]![Shop]
FirstQin = DLookup("[1Qin]", "Input", "[Shop] ='" & frmShp & "'" And "[TempDate] =#" & FrmDate & "#")
Any help would be greatly appretiated
Currently I am still useing access97 (sad I know) and I can not seem to get this dlookup function in my vb code to work. I keep getting a type mismatch error when I run the code. I am sure it is my formating of the line but cant seem to get it right. I verified my fields are all the correct data type.
Dim FirstQin As Long
Dim FrmDate As Date
Dim frmShp As String
FrmDate = [Forms]![Main Form]![tempDate]
frmShp = [Forms]![Main Form]![Shop]
FirstQin = DLookup("[1Qin]", "Input", "[Shop] ='" & frmShp & "'" And "[TempDate] =#" & FrmDate & "#")
Any help would be greatly appretiated
Comment