
August 1st, 2004, 08:04 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
select query between VB and Access
i would like to select a field from a table.(The field i want to select is called Pmodel)
but it keeps giving me an error of (very few parameters)
where i want the selected number displayed in a test field.
I have two table users and printers..
the user has a foriegn key to the pinters table which is the
printers ID number..its called PID in the Users table and ID in the
printers table.
and the code is as follows:
Set rsModel = dbIT.OpenRecordset("SELECT Pmodel from Users,Printers where rsUsers!Snum = staffNumber AND rsPrinters!ID = rsUsers!PID and rsUsers!ID='?' and rsUsers!Sname='?' AND rsUSers!DeptName='?' AND rsUsers=!Pid='?' AND rsPrinters!Bnumber='?' AND rsPrinters!Cnumber=?")
txtModel.text= rsModel!Pmodel
Would u help me plz to get the needed information from a table...
i really appreciate your help..thank u
|