SunQuest
 
           Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 29th, 2008, 06:33 AM
Birkofas Birkofas is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 16 Birkofas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 46 m 49 sec
Reputation Power: 0
Open selected record

In my form I have list box lstNames, subform sfrmDate and button PreviewReport, which opens all records in report rptNames. I need this report button open selected name from the list box with data from subform. I don't know how to write the code for this action. Can you help me please.

Reply With Quote
  #2  
Old April 30th, 2008, 04:06 PM
dykebert's Avatar
dykebert dykebert is offline
Contributing User
Click here for more information. Click here for more information
 
Join Date: Apr 2008
Posts: 200 dykebert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 32 m 29 sec
Reputation Power: 1
So when you say "data from the subForm" do you mean that the data in subform need to be part of the WHERE clause or part of the SELECT clause?

Reply With Quote
  #3  
Old May 1st, 2008, 12:42 PM
Birkofas Birkofas is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 16 Birkofas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 46 m 49 sec
Reputation Power: 0
Actually in the list I have names where I can make selection and the attendance dates becoming in the subform. In my report have to be shown information which is selected in the listbox and shown in subform, but my situation is when I click on the report button it open report where I have all names from listbox and dates related to them. Can you help me sort this, please?

Reply With Quote
  #4  
Old May 1st, 2008, 01:21 PM
Birkofas Birkofas is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 16 Birkofas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 46 m 49 sec
Reputation Power: 0
Actually in the list I have names where I can make selection and the attendance dates becoming in the subform. In my report have to be shown information which is selected in the listbox and shown in subform, but my situation is when I click on the report button it open report where I have all names from listbox and dates related to them. Can you help me sort this, please?

Reply With Quote
  #5  
Old May 1st, 2008, 04:04 PM
dykebert's Avatar
dykebert dykebert is offline
Contributing User
Click here for more information. Click here for more information
 
Join Date: Apr 2008
Posts: 200 dykebert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 32 m 29 sec
Reputation Power: 1
I can think of at least 2 ways to solve this. I'll put together some samples and post soon.

Reply With Quote
  #6  
Old May 2nd, 2008, 01:33 AM
dykebert's Avatar
dykebert dykebert is offline
Contributing User
Click here for more information. Click here for more information
 
Join Date: Apr 2008
Posts: 200 dykebert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 3 h 32 m 29 sec
Reputation Power: 1
Basically the two methods that I know will work are:

1. Create the report based on a stored query then update the SQL for the query based on the selections in the form.

2. Create the report with just the SELECT and FROM clauses then pass in the where clause using the openreport command.

I've attached a zipped file that has examples of what I'm talking about. Open the mainPeople form and then choose either report method 1 or report method 2.

I took a guess at the data structure and subform. You should be able to adapt it to your specific needs.
Attached Files
File Type: zip rptTest.zip (30.1 KB, 27 views)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Open selected record


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway