Try
DoCmd.OpenReport "rptHorseInfoOwner", acViewPreview, , "HorseID = " &
Me!HorseID '****Yellow*****
If that doesn't work, change the name of the Text Box displaying the Field
HorseID to "txtHorseID" and try
DoCmd.OpenReport "rptHorseInfoOwner", acViewPreview, , "HorseID = " &
Me!txtHorseID '****Yellow*****
If "HorseID" is a Text Field, rather than a Number Field, you'll need to add
some punctuation.
Larry Linson
Microsoft Access MVP
>> On my Form I have a Print Preview Control
>> My Form / has a Text Box [tbHorseID] Control Source [HorseID]
[quoted text clipped - 12 lines]
> [qHorseNameSourceAddMode.HorseID]
> Thanks Bob
Bob V - 26 May 2007 06:15 GMT
Thanks Larry I copied the Name text box and hid it on my form seems to be
working fine.....Thanx Bob
Private Sub Command682_Click()
On Error GoTo Err_Command12_Click
Dim stDocName As String
DoCmd.OpenReport "HorseInfoOwner", acViewPreview, ,
"[Name]=Forms!frmHorseInfo!Name"
Exit_Command12_Click:
Exit Sub
Err_Command12_Click:
MsgBox Err.Description
Resume Exit_Command12_Click
End Sub
> Try
>
[quoted text clipped - 29 lines]
>> [qHorseNameSourceAddMode.HorseID]
>> Thanks Bob
Larry Linson - 26 May 2007 08:40 GMT
A word of caution: Name is not a good name for a Field; it is an Access
reserved word, the name of a property of many objects, including Tables,
Queries, and Fields. Using reserved words can, at best, be confusing; at
worst, you can have errors that may be difficult to debug.
Larry Linson
Microsoft Access MVP
> Thanks Larry I copied the Name text box and hid it on my form seems to be
> working fine.....Thanx Bob
[quoted text clipped - 46 lines]
>>> [qHorseNameSourceAddMode.HorseID]
>>> Thanks Bob
Bob V - 26 May 2007 08:48 GMT
Thanks Larry, I will change it to HorseName?...Regards Bob
>A word of caution: Name is not a good name for a Field; it is an Access
>reserved word, the name of a property of many objects, including Tables,
[quoted text clipped - 54 lines]
>>>> [qHorseNameSourceAddMode.HorseID]
>>>> Thanks Bob