-
How can i use SQL statements to show the list of items available/a customer has ordered into a datacombo. And after showing, when user click on an item it is able to show on a label. And when click it is to be save into a file in Access'97. How can i do that? What are the codes to do all that?
-
Sabine, could you be a bit more specifique.
The data combo, is it already filled with your items ?
What do you want to show to the user and where.
What do you have already ??
Is your acces file already made ??
Please give some more specifications.
-
Well, there's already data in the Access database.
What i need is to show what items the customer has ordered into datacombo, which means, the datacombo should show the list of the customer's items.
I have an order table(contains the custID, invoiceNumber, invoiceDate, itemNumber and itemDescription) and a customer table(consists of all customer details eg custID) in the Access.
Thanks for your help!
-
Hi, could u be more specific about ur requirement. i think in a general scenario, you would like to show the customer information about all the items available with u and u say that u want to show all the items the customer has ordered. could u be more specific please because u seem to be a bit confused.
-
Sorry for the vague objectives. I would like to show all the items the customer has ordered. Thanks again!
-
hi again, i can't seem to add records using the following codes. It says Compile Error: Can't find project or library. When i debug, Dim rst As Recordset is highlighted. Can anyone tell me the correct codes? And how can i get the current date? Is it using Date? I've tried doing this code:-
storedate=Date, but it doesn't work. What is the correct way? But when i use the Now, it works, but i don't want the time, i just want to store the date into the one of the fields call LastUpdatedOn in `Order` table
Here are the codes i've written using the SQL statements:
Dim dbs As deOrderEntry
Dim rst As Recordset
Dim strsql As String
Set dbs = New deOrderEntry
Set rst = New Recordset
dbs.OrderEntry.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\Serene 1057\ProjectVBPro3\Ordersys.mdb"
strsql = "INSERT INTO `Order`(InvoiceNumber,InvoiceDate,CustomerID,LastUpdatedBy)Values('" & txtInvoiceNo.Text & "','" & txtInvoiceDate.Text & "','" & txtCustID.Text & "','" & txtorderupdateon.Text & "','" & Staff & "')"
-
Hi, Sabine the library that can't be found should be the reference to the Microsoft DAO 3.51 Object Library.
And if your access table requires a date then you can give Date instead of Now .
For the items to show it could be like
"Select itemDescription From order Where CustID = '" & ID & "'"