|
Home > Archive > MS Access project with SQL Server > March 2006 > Using GUID as Filter for Report
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Using GUID as Filter for Report
|
|
|
| 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.
--
Regards,
Alan
| |
| Peter Yang [MSFT] 2006-02-15, 7:25 am |
| 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/defaul...kb;EN-US;197916
http://msdn.microsoft.com/library/d...-us/cpref/html/
frlrfsystemguidclass
newguidtopic.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.
--------------------
>Thread-Topic: Using GUID as Filter for Report
>thread-index: AcYyCXV3GcMeraAKT6ak
F+wZafDn9Q==
>X-WBNR-Posting-Host: 202.7.166.168
>From: "=?Utf-8?B?c3RlZWw=?=" <steel@community.nospam>
>Subject: Using GUID as Filter for Report
>Date: Wed, 15 Feb 2006 00:26:03 -0800
>Lines: 15
>Message-ID: <A58F8594-5848-439E-BF1D- CAB50EF78E2D@microso
ft.com>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.access.adp.sqlserver
>NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
>Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
>Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.access.adp.sqlserver:23729
>X-Tomcat-NG: microsoft.public.access.adp.sqlserver
>
>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.
>--
>Regards,
>
>Alan
>
| |
| giorgio rancati 2006-02-15, 7:25 am |
| 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...ingFromGUID.asp
bye
--
Giorgio Rancati
[Office Access MVP]
"steel" <steel@community.nospam> ha scritto nel messaggio
news:A58F8594-5848-439E-BF1D- CAB50EF78E2D@microso
ft.com...
> 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.
> --
> Regards,
>
> Alan
| |
|
| 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" wrote:
> 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...ingFromGUID.asp
>
>
> bye
> --
> Giorgio Rancati
> [Office Access MVP]
>
> "steel" <steel@community.nospam> ha scritto nel messaggio
> news:A58F8594-5848-439E-BF1D- CAB50EF78E2D@microso
ft.com...
>
>
>
|
|
|
|
|