Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to refer to field name ending with "# " that is not a date

Status
Not open for further replies.

capndave

Technical User
Mar 4, 2003
36
US
I mistakenly chose to name a field "MR#" and now in an event procedure this is seen as a date. How do I refer to the field "Forms!CAD_LOG1!MR#" in the statement below

Private Sub PrintHx_Click()
On Error GoTo Err_PrintHx_Click

Dim stDocName As String

stDocName = "rptPatientHx"
DoCmd.OpenReport stDocName, acPreview, , "[MR#]=Forms!CAD_LOG1!MR#"


Exit_PrintHx_Click:
Exit Sub

Err_PrintHx_Click:
MsgBox Err.Description
Resume Exit_PrintHx_Click
End Sub


Thanks
 
Put it in square brackets [ ]

A wise man once said
"The only thing normal about database guys is their tables".
 
Just around the MR# part

Hope this helps,

Alex

A wise man once said
"The only thing normal about database guys is their tables".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top