Hello i've a little problem with my VBA code i'm trying to select the right gps number (double) which matches to the string Name in table tblpersonal and the string in the textbox tabletbesitzerbox. The GPS number should be displayed in the textbox fkgps:
Private Sub SP_Besitzersuche_Click()
DoCmd.OpenForm "F-Tablet-Hinzufuegen-Neu"
Dim Sim As Double
Sim = Nz(DLookup("[GPS]", _
"tblPersonal", _
"Name = " & Forms![F-Tablet-Hinzufuegen-Neu]![tabletbesitzerbox]), "")
FKGPS.Value = Sim
End Sub
The error shows me: Syntaxerror (missing Operation) in query expression 'Name = XY' I'm thankful for every help :)