If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > previewing specific records in a report

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-21-04, 12:00
bajan_elf bajan_elf is offline
Registered User
 
Join Date: Feb 2004
Location: Barbados
Posts: 50
previewing specific records in a report

Hi,

I have a form which contains records about patients. the primiary is PatientID and is based on the national ID number.

I have compiled a query to show the patient's bill (invoice). from this query I have created a report. i have placed a button on the same form mentioned above that will open the report. right now the button opens the report and all the records are showing.

i would like it that when the user goes to a particular record in the form, the user can click on the button to preview just that record's bill and no others.

i'm using access 2000.

bajanElf
__________________
"The extreme always make an impression." - Jeff Hardy
Reply With Quote
  #2 (permalink)  
Old 04-21-04, 12:03
bajan_elf bajan_elf is offline
Registered User
 
Join Date: Feb 2004
Location: Barbados
Posts: 50
i should also mention i was told that i could "fix" the query in sql, but i'm not to sure how to do that.
__________________
"The extreme always make an impression." - Jeff Hardy
Reply With Quote
  #3 (permalink)  
Old 04-21-04, 12:20
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
Quote:
Originally posted by bajan_elf
i should also mention i was told that i could "fix" the query in sql, but i'm not to sure how to do that.
The simplest answer is to build a criteria that restricts the query to just the data for a particular employee or bill. Without knowing a good bit more about your application, I can't really give you any specifics. The basic process isn't tough, you just add a criteria in the query form where client_number = x or where bill_id = y.

-PatP
Reply With Quote
  #4 (permalink)  
Old 04-21-04, 12:50
bajan_elf bajan_elf is offline
Registered User
 
Join Date: Feb 2004
Location: Barbados
Posts: 50
hmmm... no worries Pat. i got it working. it seems i needed a piece of code inthe command button the opens the report. below is what i added.

DoCmd.OpenReport stDocName, acPreview, "", "[PatientID]=[Forms]![frmAppointments]![PatientID]"

so in fact i didn't really need sql. thanks for taking the time to look at my post anyway tho, it was greatly appreciated.

bajan elf
__________________
"The extreme always make an impression." - Jeff Hardy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On