Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Solved: Access 2007 - Print single record selected on continuous form


(!)

MuddyTurtle's Avatar
MuddyTurtle MuddyTurtle is offline
Junior Member with 16 posts.
THREAD STARTER
 
Join Date: Jun 2010
Location: Virginia, USA
Experience: Intermediate
30-Jun-2010, 01:21 PM #1
Solved: Access 2007 - Print single record selected on continuous form
Hi! I'm new to the forum, and not as knowledgable about Access 2007 as I thought I was when I started this project, so please bear with me as I trip over words and concepts!

I have a master form set up with synch'd combo boxes. The 2nd combo box displays results in a continuous form - showing a shortened version (query'd) of the matching records.

I need to be able to select a record in the continuous form and view +/ print the chosen record from the main table.

I created a report to display the record.
I created a command button to open/view the report but it opens to the 1st record in the entire database instead of the record selected in the continuous form.

How do I get the command button to open up the full record indicated by choosing the shortened version in the continuous form?

Hope this makes sense. Any suggestions / thoughts are welcome! Thanks in advance.
OBP's Avatar
OBP OBP is offline OBP is a Trusted Advisor with special permissions.
Computer Specs
Trusted Advisor with 18,616 posts.
 
Join Date: Mar 2005
Location: UK
30-Jun-2010, 01:50 PM #2
MuddyTurtle, welcome to the Forum.
Your question makes complete sense, the easiest way to achieve what you want to create a Query for your report.
In the Key field enter this in the First Criteria Row.
forms![Formname]![Subformname]![Key Field Name]
where Formname is the name of your mainform, Subformname is the name of the subform as the mainform sees it and
Key Field Name is the name of the key field on the subform that identifies the Record that you are on.
__________________
OBP
I do not give up easily
MuddyTurtle's Avatar
MuddyTurtle MuddyTurtle is offline
Junior Member with 16 posts.
THREAD STARTER
 
Join Date: Jun 2010
Location: Virginia, USA
Experience: Intermediate
30-Jun-2010, 03:43 PM #3
OPB, Thanks for the rapid response!
That seems to have done the trick! It took me a bit to work through where to put what so in case anyone else comes across this question here is what I did.

I created a query based on the master table for the database - I named it SelectRecordQuery
For the "Field" I used the primary key which is my identifier for the record and also shows up on my subform query results.
In "Criteria" I used the code provided by OBP (Thanks!)
For the control button to view the record, in the property sheet > event tab > "on click" embedded macro
Action:"Open Report"
Report Name: name of sub report
Filter Name: SelectRecordQuery

WoooHooo!
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
access 2007, continuous form, select record

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Title Thread Starter Forum Replies Last Post
Solved: Access 2007 - Find a record from a combo box selection angells3333 Business Applications 4 17-Jun-2010 01:08 PM
Access 2007 - searching for specific record in two forms strods Business Applications 3 12-Jul-2009 03:31 PM
Access 2007 Form Button Wizard - Form does not open with the correct records wittzi Business Applications 1 15-Feb-2009 11:37 AM
Solved: Access 2007 - Form Tabs Problem Renamed&Closed Business Applications 4 06-Jan-2009 05:00 PM
Access 2007 Wont Save Form onsitesol Business Applications 0 08-Oct-2008 04:01 PM

WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑