Guest_imported
New member
- Jan 1, 1970
- 0
heres the situation.
My tables are named tbltransaction and tblcustomer
One to many relationship between CutomerId(one in the tblcustomer)to many(tbltransaction-CustomerId)
Using access 2000 database
Fields in this table are named CustomerId a text field
and TransactionId which is an auto number-Long
my variables are lngtid as long-Used for number the user inputs for the TransactionId based on this
I need the correct way to use sql in Vb to get the result of The TransactionId matching the user input and the One to many CustomerId..Example CusotmerId 1 had transaction 2 for instance and I need all info from both tables that match..
Here is my attemp but I cant get it to work..
ssql="Select * From tblcustomer,tbltransaction Where [TransactionId]=" & lngtid & '" and tblcustomer.[CustomerId]=tbltansaction.[CustomerId]"
I get that error about tbltransaction is a variable that is not defined!Please help.....
My tables are named tbltransaction and tblcustomer
One to many relationship between CutomerId(one in the tblcustomer)to many(tbltransaction-CustomerId)
Using access 2000 database
Fields in this table are named CustomerId a text field
and TransactionId which is an auto number-Long
my variables are lngtid as long-Used for number the user inputs for the TransactionId based on this
I need the correct way to use sql in Vb to get the result of The TransactionId matching the user input and the One to many CustomerId..Example CusotmerId 1 had transaction 2 for instance and I need all info from both tables that match..
Here is my attemp but I cant get it to work..
ssql="Select * From tblcustomer,tbltransaction Where [TransactionId]=" & lngtid & '" and tblcustomer.[CustomerId]=tbltansaction.[CustomerId]"
I get that error about tbltransaction is a variable that is not defined!Please help.....