Passing Values from one field to another on a form.

thompson905

Registered User.
Local time
Today, 10:59
Joined
Mar 26, 2008
Messages
15
Hello all,
I am very new to access but I hope this isnt too difficult to accomplish.

I have a client form and on the form I have a tabbed sub from which pulls in data from other table based on a primary key. Well Since all of these docs were imported from Lotus Notes the primary key is a long hexidecimal number. Well I had to create a new AutoNumber field that will replace the current primary key upon launch of the system. I need to know how i can have the AutoGenerated key on NEW records passed to the subform tables while the users is creating the record? I hope I was clear..if not just tell me what else you need. Thanks alot for the help

Tom
 
If the generated key is a GUID you can use that as a key instead of a Autonumber field.

Something like "{947bb102-5d43-11d1-bdbf-00c04fb92675}" w/o the quotes
 
Well I guess I wasnt sure how to make a primary key column that wasnt autogenerated to make it so it picks up from where the last one let off. I tried to just switch it and it earased all my imported key and replaced them with auto generated keys. But since the documents are linked by the keys..that wont work. What I did do was put in another column and generate keys then I ran an update query based on the link keys..that worked fine. But the issue I am having is on new records and getting them to tie togather with the new keys.
 
Try to work with the existing key from the other system or create a table to store the relationship between the old and the new key!
 
Guus thanks for your help so far..but I am still wondering how to pass values from one field in a table to another field in another table. Do I use maco or querys? Just not sure how to accomplish this.
 
Are you sure you want to do this? This is *not done* in normalised tables.

You could use an update query.
 
really? I guess I didnt think it would be that "out of the ordinary". I guess I dont understand what the problem would be...I have a form that recieves an autonumber upon creation...I want that to pass that autonumber to a field in a table on the subform table so the records will be linked...
 
In design mode, use the "Link Master Fields" property to identify the field in the primary table which points to the foreign key field in the subform.

It is a bit difficult to find. Select the (outer) subform's container and look at the data properties. If you have selected the correct container, the associated label will be selected also.
 
In design mode, use the "Link Master Fields" property to identify the field in the primary table which points to the foreign key field in the subform.

It is a bit difficult to find. Select the (outer) subform's container and look at the data properties. If you have selected the correct container, the associated label will be selected also.

FANTASTIC!!! This works just like I hoped it would :P Excellent!!! Thanks alot. I am now able to create new records and have that autonumber key propigate to the subtables/subforms!
 

Users who are viewing this thread

Back
Top Bottom