Print Current Record

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

Guest

How do I print the current record from a form where the table has multiple
fields for a primary key???

I was able to print current records from a form where the table has only 1
field as a primary key with the following...
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "My Report", acViewPreview, , strWhere
 
Jet said:
How do I print the current record from a form where the table has multiple
fields for a primary key???

I was able to print current records from a form where the table has only 1
field as a primary key with the following...
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "My Report", acViewPreview, , strWhere


Include all the PK fields in the WhereCondition:

strWhere = "PK1 = " & Me.Pk1 & " And PK2 = " & Me.Pk2 _
" And PK3 = " & Me.Pk3 & . . .
 
Thanks for your help Marsh!

Marshall Barton said:
Jet said:
How do I print the current record from a form where the table has multiple
fields for a primary key???

I was able to print current records from a form where the table has only 1
field as a primary key with the following...
strWhere = "[ID] = " & Me.[ID]
DoCmd.OpenReport "My Report", acViewPreview, , strWhere


Include all the PK fields in the WhereCondition:

strWhere = "PK1 = " & Me.Pk1 & " And PK2 = " & Me.Pk2 _
" And PK3 = " & Me.Pk3 & . . .
 
Back
Top