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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find First Problem 2

Status
Not open for further replies.

Trudye

Programmer
Sep 4, 2001
932
0
0
US

Hi Guys. I am having a problem formating my Find First command. I have a dual criteria, here's the line of code.

rs2.FindFirst "acctnmbr_out= '" & rs1!AcctNmbr_Out & "'" And rectype_out = "01" 'FIND First 01 REc

It worked find until I added the second criteria. I tried making the "01" a string format like acctnmbr_out but received a syntax error.

Any Ideas?

Thanx much,
Trudye
 
Try

[tt]"acctnmbr_out= '" & rs1!AcctNmbr_Out & "' And rectype_out = 01"[/tt]
or perhaps
[tt]"acctnmbr_out= '" & rs1!AcctNmbr_Out & "' And rectype_out = '01'"[/tt]
since it seems the last field might be a text field too?

Roy-Vidar
 
like that?

Code:
rs2.FindFirst "acctnmbr_out= '" & rs1!AcctNmbr_Out & "' And rectype_out = ""01"""     'FIND First 01 REc

this is assuming acctnmbr_out and rectype_out both are stings

HTH,
fly

[blue]Typos, that don't affect the functionality of code, will not be corrected.[/blue]

Martin Serra Jr.
[blue]Database_Systems and _Applications shared across all Business_Areas[/blue]
 

Thanks so much Roy-Vidar and Martin Serra Jr.
for all you help.

Trudye
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top