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

Do not expect us to guess and solve your problem.

Please pass more information.

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.

:) 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?

YES I AM CREATING CUSTOMERS AND STORING THEM IN DATA BASE.
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.
2380013-----------David----------------02--------------1
2380018-----------Ravid----------------12--------------78
2380052-----------John-----------------0---------------72

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

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.AddNew
        oRs![Party Code] = txtCode.Text
        oRs![Party Name] = rsCustomer!CustomerName
'and so ....
        oRs.Update
        MsgBox "saved"
    
    oRs.Close
rsCustomer.Close
sConn.Close

@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 :)

Yeah you're right, my bad.;)

@Jaseem, go to www.connectionstrings.com to get the connection string for your server, whether it is on your local machine, local network or web based server.

MY CODE USES SQL SERVER 2000....
THANKS AndreRet and Jx MAn

No problem, Enjoyed the cricket?

It was an awesome game today.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.