|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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.
|
|
#2
|
||||
|
||||
|
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?
|
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
|||
|
|||
|
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?
|
|
#5
|
||||
|
||||
|
I can think of at least 2 ways to solve this. I'll put together some samples and post soon.
|
|
#6
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Open selected record |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|