By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,470 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,470 IT Pros & Developers. It's quick & easy.

unique identifier problem MS ACCESS project

P: n/a
Ken
Hi,
I have a form whose control source is a view from SQL server 2005
database. The view has a primary key that is a unique identifier field
with keys generated by newid() function from SQL server 2005.
Anyhow when I try to view/assign the unique identifier field and debug/
use watchlist I get this "????????" for the value of the unique
identifier. I am able to create a text box with this unique identifier
field and view it. Its just when I use VBA I'm having problems. Any
help appreciated. Thanks

Jul 7 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ken
On Jul 7, 2:52 pm, Ken <gev...@gmail.comwrote:
Hi,
I have a form whose control source is a view from SQL server 2005
database. The view has a primary key that is a unique identifier field
with keys generated by newid() function from SQL server 2005.
Anyhow when I try to view/assign the unique identifier field and debug/
use watchlist I get this "????????" for the value of the unique
identifier. I am able to create a text box with this unique identifier
field and view it. Its just when I use VBA I'm having problems. Any
help appreciated. Thanks


On the Form Current event procedure I have this:
Dim Temp As String
Temp=Me.MyUniqueId

In this case Temp = '?????????' in the watch list.

However if I do this:
Dim Temp As Variant
Temp=Me.MyUniqueId

Then in the watch list Temp is a 0 to 15 array of integers. Is there a
type in Access that resembles the uniqueidentifier field in SQL
server?

Jul 7 '07 #2

P: n/a
Ken
On Jul 7, 3:04 pm, Ken <gev...@gmail.comwrote:
On Jul 7, 2:52 pm, Ken <gev...@gmail.comwrote:
Hi,
I have a form whose control source is a view from SQL server 2005
database. The view has a primary key that is a unique identifier field
with keys generated by newid() function from SQL server 2005.
Anyhow when I try to view/assign the unique identifier field and debug/
use watchlist I get this "????????" for the value of the unique
identifier. I am able to create a text box with this unique identifier
field and view it. Its just when I use VBA I'm having problems. Any
help appreciated. Thanks

On the Form Current event procedure I have this:
Dim Temp As String
Temp=Me.MyUniqueId

In this case Temp = '?????????' in the watch list.

However if I do this:
Dim Temp As Variant
Temp=Me.MyUniqueId

Then in the watch list Temp is a 0 to 15 array of integers. Is there a
type in Access that resembles the uniqueidentifier field in SQL
server?


Ok...I found the answer to my question. SQL unique identifier type is
a windows GUID or MS ACCESS replication ID type. You can't read these
directly. You have to use GUIDFromString, StringFromGUID Methods.

Jul 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.