bcooler
Programmer
- Jun 13, 2009
- 132
Hello!
I've recently created an Access front end for SQL server (which uses what I am guessing is called GUID primary keys). In my form, I try to open a report based on the current subform record that is chosen via a command button placed in each record. This opens the report based on the record's primary key:
This typically works, but am getting a parameter inputbox (in Asian fonts???). In my experience, this means I didn't set the filter up correctly. BUT ASIAN FONT???
Also, when I perform a "watch" on the me.txtID textbox, I get multiple values listed. HUH???
I wanted to troubleshoot down to the weird GUID key, so I tried the following (added a primary key value directly into the code)
This works.
What am I doing wrong? I tried to use the functions: HEX, GUID, STR, etc to convert the key to something Access can understand better. No luck.
Thanks!
Brian
I've recently created an Access front end for SQL server (which uses what I am guessing is called GUID primary keys). In my form, I try to open a report based on the current subform record that is chosen via a command button placed in each record. This opens the report based on the record's primary key:
Code:
Private Sub cmdOpen_Click()
DoCmd.OpenReport "rptTestResults", acViewPreview, , "[ID] = " & Me.txtID
End Sub
This typically works, but am getting a parameter inputbox (in Asian fonts???). In my experience, this means I didn't set the filter up correctly. BUT ASIAN FONT???
Also, when I perform a "watch" on the me.txtID textbox, I get multiple values listed. HUH???
I wanted to troubleshoot down to the weird GUID key, so I tried the following (added a primary key value directly into the code)
Code:
Private Sub cmdOpen_Click()
DoCmd.OpenReport "rptTestResults", acViewPreview, , "[ID] = " & "{CF5DE945-6E0A-406B-95F3-EFC41AD106D5}"
This works.
What am I doing wrong? I tried to use the functions: HEX, GUID, STR, etc to convert the key to something Access can understand better. No luck.
Thanks!
Brian