Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FindLast MUltiple Fields 1

Status
Not open for further replies.

Trob70

Programmer
Sep 25, 2012
89
AU
I have a recordset open (dynaset)

Dim ssql As String
ssql = "[RDate] = '" & MDate & "'"
This works---

But i need to find using multiple fields this does not work..
ssql = "[RDate] = '" & MDate & "'" & "," & "[RCard] = '" & Card & "'"

rstwo.FindLast ssql

LTT = rstwo.rtime

Appreciate any help with correcting this syntex to correct the problem

Regards Trob70



 
How does your ssql should look like if you would just hardcode the values in there?

How about:
[tt]
ssql = "[RDate] = '" & MDate & "' AND [RCard] = '" & Card & "'"
[/tt]
If MDate and Card are variables as text/strings

Have fun.

---- Andy
 
Andrzejek

Thanks for your help.... i can see that the ' must be in the correct place !!.. all ok now Thanks


Regards Trob 70

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top