开发者

access: how to add a workorder to a customer

开发者 https://www.devze.com 2023-01-27 12:15 出处:网络
I have a noob question but he, i\'m learning :-) I\'m making a form with the following tables 1 tblCustomers and 1 tblWorkorders.

I have a noob question but he, i'm learning :-)

I'm making a form with the following tables 1 tblCustomers and 1 tblWorkorders.

My question is:

When I add开发者_如何学C a customer to a new record, this person is stored in the table: tblCustomers this is going fine.

The problem is that I also have a table: tblWorkorders, in this table I store all the technical information, sollutions and the customers belongings. (adapter, notebook bag etc etc)

My problem excists when for example a customer named John Doe comes back with another problem 2 weeks later. In the table tblWorkorders should be 2 records with the problems of John Doe I think it has something to do with relationships between the tables, can someone tell me where to find a good example or when it's a short story, how to do this?


Very difficult to explain this concept and start you off from scratch. Be prepared for further research on different item. Here is a place to start: http://office.microsoft.com/en-us/access-help/guide-to-table-relationships-HA010120534.aspx

The following is how you would use your tables:

You need to have a common field in both tables (it can be more than one field, but let's keep it simple). The easy way is to have a CustomerID field that is a Data Type field set to: AutoNumber (It does just what it says.).

tblWorkOrders will have the same field (doesn't have to be the same name, but let's keep it simple) BUT, the Data Type is: Number Field Size: Long Interger.

If you're able to use: Database Tools | Relationships, and join the two tables by this field, developing forms and reports is a lot easier.

Your form will be based on the tblCustomers table (I know, let's keep it simple.) and a Sub Form will use the tblWorkorders table and the 'Link Master Fields' and the 'Link Child Fields' will use the CustomerID from each table.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号