> Private Sub Find_Click()
> Dim varHomePhone As Variant
> With Me.Data1.Recordset
> .FindFirst "HomePhone=" & varHomePhone
> End With
> End Sub
> Help I keep getting runtime error 3077 " Syntax error (Missing operator in
> What I am trying to do is find the record with the same phone number and
> display it to the screen.
The syntax you're using assumes that the db table field for HomePhone
is a Number DataType field. In Access, people often want the input
mask, or want to store phone numbers with "punctuation" such as
parentheses around area code and hyphen between prefix and final 4
digits - thus, phone number fields are often set to Text DataType. On
the off-chance that's true for your app, try treating your variable as
.FindFirst "HomePhone='" & varHomePhone & "'"
Jim in Cleveland
If you're writing to me, in my address
change "REAL_Address.see.below" to "worldnet.att.net"
"What's so funny 'bout peace, love & understanding?"
- Nick Lowe