Switching Datatypes

naomir

New member
Local time
Today, 14:10
Joined
May 24, 2001
Messages
5
Help!

I would like to copy a value from an 'autonumber' field to a 'number' field, but SetValue will not do it because of conflicting datatypes.

My problem is that I have a few forms to run through, and if the user does not make it through all three, then the autonumbers will become mis-aligned and integrity is lost. If I use standard 'number' fields, then I can use the SetValue method in a macro to paste in any number and keep integrity intact.

EXACTLY WHAT I WANT: To copy a numeric value from an 'autonumber' datatype to a 'number' datatype. How do I do it?

If you need more explanations, please let me know.

Thanks!

-Naomi(r)
 
Sounds to me like something isn't right here if you have to go through three forms and worry that the Autonumbers are going to get 'out of sync'. If you are trying to get autonumbers into other tables it sounds like you have a One to Many relationship between the tables. If that is the case then you need the table with the Primary key (the Autonumber) to be the source for a Main Form and your other table that is to 'get' the Autonumber in a Number field should be the Subform in the Main table. Adding records in the Subform will automatically add the Autonumber field to your Number field...

Hope that made some sense!
 
um.

Thanks for the quick response however I'm a little confused by it.
What exactly do you mean by having a subform in a main table?

The relationship is one to one . The autonumber is used to maintain referential integrity.

Would that make a difference?
 

Users who are viewing this thread

Back
Top Bottom