Using GUID as Filter for Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to Filter a report with a GUID as the uniqueIdentifier. How is
this done? I can only filter using a secondary Unique string.

The code I would like to have work is:

Dim stDocName As String

stDocName = "Labels tblParts"
DoCmd.OpenReport stDocName, acPreview, "[PartID]=" & Me.PartID

Thankyou in advance for your help.
 
Hello Alan,

As I know, this feature is not support. However, you could try to use ADO
to perform such kind of job:

Dim myGUid as GUID = GUID.NewGuid

mySQL = "UPDATE ITEMS SET Title="New Record No. 1", WHERE KeyID ='" &
myGUID.ToString & "'")

197916 How To Use GUIDs w/ Access, SQL 6.5 and SQL 7
http://support.microsoft.com/default.aspx?scid=kb;EN-US;197916

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemguidclassnewguidtopic.asp

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.


=====================================================

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 
Hi Giorgio,

I can't remember seeing a notification and have only just seen your Post.

I will try this. Thank you.

--
Regards,

Alan


giorgio rancati said:
Hi Alan,
try this
----
Dim stDocName As String
Dim strGUID As String

strGUID = StringFromGUID(Me.PartID)
strGUID = Mid(strGUID, 7)
strGUID = Left(strGUID, Len(strGUID) - 1)

stDocName = "Labels tblParts"
DoCmd.OpenReport stDocName, acPreview, , "[PartID]='" & strGUID & "'"
----

StringFromGUID Function
http://msdn.microsoft.com/library/d...ry/en-us/vbaac10/html/acfctStringFromGUID.asp


bye
--
Giorgio Rancati
[Office Access MVP]

steel said:
I am trying to Filter a report with a GUID as the uniqueIdentifier. How is
this done? I can only filter using a secondary Unique string.

The code I would like to have work is:

Dim stDocName As String

stDocName = "Labels tblParts"
DoCmd.OpenReport stDocName, acPreview, "[PartID]=" & Me.PartID

Thankyou in advance for your help.
 
Back
Top