Results 1 to 2 of 2
Thread: DLookup ? (Access 2000)
2004-11-19, 08:01 #1
- Join Date
- Jun 2002
- Thanked 0 Times in 0 Posts
DLookup ? (Access 2000)
We have 2 independend tables customers and clients.from my form Clients i want to open the form
Customers into a new record, that is CustomerID, and copy the CustomerID into my form Clients.It is difficult for me, since the table clients and
customers underlying both forms are not interrelated, there is no connection between them.
In our company we differentiate between a client and a customer.Sometimes we want to convert a client into a customer.To this end we open the form Customers into a new record,called CustomerID and copy all the data from the form Clients into the form Customers.I would like to save the
CustomerID from the form Customers into the form Clients,but i do not know is it possible at all ?
I open the form Customers with the following code :
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Customers"
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormAdd
![CompanyName] = Me![CompanyName]
!address = Me!address
!city = Me!city
DoCmd.Close acForm, Me.Name
How can i copy the CustomerID in the form Clients,when the two tables are not connected?
Maybe i must use the DLookup function,is it possible?
2004-11-19, 08:16 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: DLookup ? (Access 2000)
It would be better if you had one table for clients and customers, with a Yes/No field to indicate whether a client is a customer. You would only have to tick a check box to indicate that a client has become a customer. Copying data from one table to another is not efficient, and keeping separate copies of the same data violates relational design.