PC Review Forums Newsgroups Microsoft Access Microsoft Access VBA Modules report by unique identifier

Reply

report by unique identifier

 
Thread Tools Rate Thread
Old 16-03-2006, 08:35 PM   #1
=?Utf-8?B?ZmFzY2Fs?=
Guest
 
Posts: n/a
Default report by unique identifier


Hi,

I have a command button on a form. The form brings up patient information
by a unique identifier called PatientID. The button calls open to preview
before printing a form a sheet of 30 labels. The problem, is that instead of
bringing up just a sheet for that one patient, it brings up a sheet of 30
labels for every patient.

any help would be appreciated. The code is below.

Private Sub cmdHCPatientLabel_Click()

DoCmd.OpenForm "HC_labels", acNormal, ,
"[forms]![frmPatients]![PatientID]=" & [PatientID]


End Sub
  Reply With Quote
Old 16-03-2006, 08:57 PM   #2
apna
Guest
 
Posts: n/a
Default Re: report by unique identifier

I think try this

DoCmd.OpenForm "HC_labels", acSelection, ,
"[forms]![frmPatients]![PatientID]=" & [PatientID]


"fascal" <fascal@discussions.microsoft.com> wrote in message
news:ACD1F85C-D464-4223-A09C-6EBE68A89514@microsoft.com...
> Hi,
>
> I have a command button on a form. The form brings up patient information
> by a unique identifier called PatientID. The button calls open to preview
> before printing a form a sheet of 30 labels. The problem, is that instead
> of
> bringing up just a sheet for that one patient, it brings up a sheet of 30
> labels for every patient.
>
> any help would be appreciated. The code is below.
>
> Private Sub cmdHCPatientLabel_Click()
>
> DoCmd.OpenForm "HC_labels", acNormal, ,
> "[forms]![frmPatients]![PatientID]=" & [PatientID]
>
>
> End Sub



  Reply With Quote
Old 16-03-2006, 10:15 PM   #3
=?Utf-8?B?ZmFzY2Fs?=
Guest
 
Posts: n/a
Default Re: report by unique identifier

that opened the form in design view.

"apna" wrote:

> I think try this
>
> DoCmd.OpenForm "HC_labels", acSelection, ,
> "[forms]![frmPatients]![PatientID]=" & [PatientID]
>
>
> "fascal" <fascal@discussions.microsoft.com> wrote in message
> news:ACD1F85C-D464-4223-A09C-6EBE68A89514@microsoft.com...
> > Hi,
> >
> > I have a command button on a form. The form brings up patient information
> > by a unique identifier called PatientID. The button calls open to preview
> > before printing a form a sheet of 30 labels. The problem, is that instead
> > of
> > bringing up just a sheet for that one patient, it brings up a sheet of 30
> > labels for every patient.
> >
> > any help would be appreciated. The code is below.
> >
> > Private Sub cmdHCPatientLabel_Click()
> >
> > DoCmd.OpenForm "HC_labels", acNormal, ,
> > "[forms]![frmPatients]![PatientID]=" & [PatientID]
> >
> >
> > End Sub

>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off