Hello friends
I am Sarfaraz. Friends I am working on a billing project in VB6 and access. I have to save the information of a client like Id, Account No, name etc and most important Items(from a combo box) and then based on that combo box item select type of item from another combo box and finally length and width of that item and save them in a database.
I have done that but the client can ask for more than one item and I want to keep his A/c no and other details same . how can I do that I need some guidance in it.
Also his billing details like credit amount, debut amount and balance should be searched by his A/c no.
To save the details for single Item and type of item i have used the following code which is working correctly but now how to save second item of the same client having without changing his A/c no.
Connection
sql = "customers"
rs.Open sql, Con, adOpenDynamic, adLockOptimistic
With rs
.AddNew
.Fields("account_no") = "DM-" & txtid.Text
.Fields("cus_name") = txtname.Text
.Fields("cus_address") = txtaddress.Text
.Fields("contact_no") = txtcontact.Text
.Fields("email") = txtemail.Text
.Fields("item") = cmboitems.Text
.Fields("type") = cmbotype.Text
.Fields("length") = txtlength.Text
.Fields("width") = txtwidth.Text
.Fields("Amount") = txtlength.Text * txtwidth.Text * txtrate.Text
.Update
.Close
Con.Close
End With
MsgBox "Data has been successfully Added into the Database, Please Proceed", vbInformation, "INFORMATION"
Thank you