views:

213

answers:

3

I am currently "forced" to create a database in ms access 2007.

Due to replication issues i have decided to use autonumber as ReplicationID for my Users table.

On my venues table i would like to use this id as the user created.

I have tried to use the userID in textboxes accross the main form, but it outputs

{guid {BF40D0A0-A1F3-4C98-A9B6-D9D075F0BBA3}}

and when using this value to insert into my Venues table, it generates a new ReplicationID.

Am i missing some setting where it will use the GUID provided, or do you have any other suggestion.

Regards.

A: 

OK i found it. What happened was that you cannot insert a guid string in ms access, you have to use the actual object. Then all was fine.

dont use StringFromGUID/GUIDFromString, just insert the object as is and all is well.

Any questions and i will gladly explain X-)

astander
+2  A: 

I don't pretend to understand replication in Access. However the two best resources are

Tony Toews
A: 

Don't expose autonumber values to users, especially of the GUID flavour!

onedaywhen
I would like to use it as a foreign key in another table, so storing it in a hidden field. The user will not see the GUID.
astander
But why store it in a hidden field. Sounds crazy to me. No doubt that's the way Access Forms work, then ;)
onedaywhen
Don't use autonumber GUID fields at all.
Tony Toews
Don't use autonumber fields at all. Your move.
onedaywhen
I quite like autonumber fields and use them all the time. However this is a religious argument to some.
Tony Toews
You were supposed to say you don't use fields (city slicker perhaps?) or similar contraction. I win, thanks for playing ;)
onedaywhen