i have a project, where i have a menu, in which option Customer info, where all the basic information of customer is stored...and blow there is another menu, whre Asset Servey is menu, now i have a text box in wch customer with its code is shown, now i want to issue them assets, how would i make its database, means when i assign the asset to customer every asset shoould go and store in data base with his acount.
please helppppppppppp

Set the customer id as primary key. In your asset table have a field for the customer id. Every customer and asset will then be "linked" this way.

If you wanted code, post what code you have and we will then help with solving errors.

I HAVE attached the two pix, one is cust and other is asset..
in cust, new customers are created, updated ino, the code and party name will b called in asset, and they will b assigned some assets, wht shud i do? how the table will b created in sql, where the assets with customer info should b stored.

Attachments ASSET.jpg 67.89 KB CUST.jpg 68.74 KB

:) Please do not use sms/textmessaging language. It makes it so much harder to understand what you are trying to say.:)

What I could gather from the pics, you add a customer to your database, using a datacontrol it seems?

You now want to add some party items like say a tent, tables, chairs etc. to the customer?

now i want to give them some assets like chairs and ect. then how these chairs and tables will b given to them, as when i open that customer report the given assets should be shown in a report with customer name.
for eg.

Party Code--------Party Name---------Tables----------Chairs.

now when i enter party code, the all rest record should b shown in text boxs, as i made the table for them in Vb

Edited 5 Years Ago by Jaseem Ahmed: n/a

I see, you can then use something like -

Dim sConn As String
    Dim oConn As New ADODB.Connection
    Dim rsCustomer As New ADODB.Recordset
    Dim oRs As New ADODB.Recordset
    sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\YourDatabaseNAmeHere.MDB;Persist Security Info=False"
    oConn.Open sConn

    rsCustomer.Open "SELECT * FROM YourTableNameHere WHERE CustomerId = '123456'",sConn, adOpenStatic, adLockOptimistic

    oRs.Open "SELECT * FROM YourAssetsTableNameHere", oConn, adOpenKeyset, adLockOptimistic
        oRs![Party Code] = txtCode.Text
        oRs![Party Name] = rsCustomer!CustomerName
'and so ....
        MsgBox "saved"

@Jaseem Ahmed : your code use sql server or access for database?
@AndreRet : i think this code using sql server, coz your codes using for access, maybe u missed it :)

No problem, Enjoyed the cricket?

It was an awesome game today.

Please mark this as solved, found at the bottom of this page, thanks.:)

This question has already been answered. Start a new discussion instead.