Link to home
Start Free TrialLog in
Avatar of foxsage
foxsage

asked on

VB SQL

I am familiar with SQL in Visual Foxpro. Obviously SQL in VB is a little different!   Where do I put a SQL statement (other than the recordsource property of a data control)that will return results to a flex grid? (I would rather not use debug.print to show the results). I would also like to allow the user, I guess through seek, to determine the search variable.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of wford
wford
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coggie
coggie

Hi there,

Is this any help:-

Set qry = CurrentDB.CreateQueryDef("", "Select * from <TableName>")

rather than use seek use find first after the previous line like this:-

Set rst = qry.OpenRecordset()
With rst
 .FindFirst ("UserName = '" & sUserNameEntered & "' AND UserPWD = '" & sPasswordEntered & "'")

hope this helps

Regards,

Coggie