G
Guest
Does anyone know if there is a way to just print one record out of a table in
a report format? Thanks in advance.
a report format? Thanks in advance.
r. howell said:This is probably more complicated than what you want to do, and someone may
come up with an easier solution.
But here's what I do. You write the report, so that it looks the way you
want it to.
Then you make a form, which asks the person which record they want to print.
Add a button to the form, which will open up your report in preview manner.
Add code to the button (There is code there already, click on the Build
event item that shows when you right click the button in design view).
Dim stWhere As String
stWhere = "[FVFUnNo] = '" & Me.FVFUnNo & "'"
DoCmd.OpenReport stDocName, acPreview, , stWhere
StWhere has to eventually be a string which surrounds a text field with
single quotations, a number field is left alone, and I believe that a date
field should be surrounded by number signs (#). The code as it stands is for
finding a record defined by FVFUnNo, which is a text field.
The DoCmd.OpenReport stDocName,acPreview line will already be there.
Add the ,,stWhere at the end of the line, and put the rest of the code given
above that line.
Hope this helps.
:
Does anyone know if there is a way to just print one record out of a table in
a report format? Thanks in advance.