Question Locked

Print a Report from a current Form entry

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello All,

I need some help to work out how I can Print a Report (invoice) from a Form that has just been entered in MS Access 2003.

i.e. Type in the information into a form and subform then click on a button a the bottom to print the invoice out using a form.

I hope someone can help.

Thanks a million.

James.

5 replies

by unhappyuser

Set up a button on the form to print the current record.

EMD

by james

Could you please point me in the right direction of some code to do that as I can't seem to print just the current record, it seems to want to print all the records in the table.

Thanks,

JM

by unhappyuser

Open the form in Design View. Click on the button icon and choose Form Operations under Categories and Print Current Form under Actions. Choose Text or Picture for the icon and Finish.

EMD

by oss2010

Private Sub ???43_Click()
' chek your id name on you db

If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If

If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ID] = " & Me.[id]
DoCmd.OpenReport "t1", acViewPreview, , strWhere
End If
End Sub

This discussion is closed to new replies.