473,671 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I create a report with a dropdown field just like the form?

25 New Member
I am trying to create a report that asks the user to select the report option from a drop down field. The field is based on field in a form, which pulls its options from a table.

Source Table - tblDelayReasons - contains 8 reasons

Form - frmMain Table - users select reason using combo box while entering data into form

Field in Form - Reason if Procedure Delayed

I want the report to ask user to select from same list of reasons. I have tried to create query using criteria below, but query just asks for input for this field.

[forms]![frmMainTable]![Reason if Procedure Delayed]

This using access 2003
Jan 18 '10 #1
8 2314
NeoPa
32,569 Recognized Expert Moderator MVP
The only thing obvious is that the name of your form is shown in two ways in your post. I expect your code should work if the names are correct. Otherwise try :
Expand|Select|Wrap|Line Numbers
  1. [Forms]![frmMain Table]![Reason if Procedure Delayed]
For further tips (although, as I say, your format looks fine) see Referring to Items on a Sub-Form.
Jan 18 '10 #2
klbrownie
25 New Member
My apologies... That was a typo on my part when I was giving the example. The Form name is "frmMain Table" with the space.

(whew! that would have been embarassing if that was the reason!!!)
Jan 18 '10 #3
NeoPa
32,569 Recognized Expert Moderator MVP
That's why we always suggest most strongly (Think of a point just short of insist for politeness) that you use Copy/Paste when showing us your code. You'd be surprised how often freehand typos do cause the problem. At best they just waste a little time.

In this case, I'm not sure what might be wrong. I still suspect it may be something to do with the name, but as I have no access to the actual form in your database it's hard to check. As I said earlier, the format of the reference seems fine.
Jan 19 '10 #4
klbrownie
25 New Member
I think there is something going on with the whole database. I have another issue where something that "should" be working, is not. I have a query just to count all the "yes" values in a checkbox field that is counting every record no matter what I try.

I need a beer!
Jan 19 '10 #5
NeoPa
32,569 Recognized Expert Moderator MVP
Do you want to Copy/Paste the SQL in here for us to check over for you. Sometimes an extra set of eyes is all that's needed.
Jan 20 '10 #6
klbrownie
25 New Member
Sorry it took so long to get back, I was given a "drop everything and do this" project. Those are SO much fun!!!

Ok, I found a way to get around the check bos issue, but I still have my original problem, the drop down on the report. Below is the SQL for a dumbed down version of my query (I removed all the non pertinent fields).
Expand|Select|Wrap|Line Numbers
  1. SELECT [Main Table].[Last Name], [Main Table].[First Name], [Main Table].[Reason if Procedure Delayed]
  2. FROM [Main Table]
  3. WHERE ((([Main Table].[Reason if Procedure Delayed])=[forms]![frmMain Table]![Reason if Procedure Delayed]));
Anything else needed to debug this?
Jan 26 '10 #7
NeoPa
32,569 Recognized Expert Moderator MVP
Let's take a step back here. I may have missed a glaring point earlier.

You want the user to interface with the report itself?

If so then you should understand that this is not supported for Reports.
Jan 27 '10 #8
Stewart Ross
2,545 Recognized Expert Moderator Specialist
As NeoPa has said, reports cannot interact with users. If you want users to be able to select particular reasons etc from a drop-down list you will need to design an unbound form for the user to interact with and populate that with the controls you want the user to make the selections from, and a command button to run the report when the user is ready.

The code behind the command button would be the place to build a Where condition string to apply to the report on open. Filtering a report using a Where condition string is not particularly difficult if you are careful about delimiting string values etc correctly. The Where condition string (like a 'Where' condition in SQL but without the keyword 'Where') is an optional argument of the DoCmd.OpenRepor t method that the command button calls.

-Stewart
Jan 27 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1755
by: Mosher | last post by:
Hi all, I am looking for some event handler auto-calc help on a form that takes user input through text fields and dropdown menus. I would like some of the text fields to be auto populated when dropdown menu selections are made. Here is an abstract html/javascript form: <form> Enter how much money you are willing to spend:<input type=text name=amount size=10> Enter your home city: <select name=city>
6
7360
by: Rey | last post by:
Howdy, all. Appreciate your help. Have a one to many relation between a client and visit table. In the visit subform, I have a visittype and counselor field which are comboboxes. If I set either field to drop down via Me.dropdown in the GotFocus event for the field, each time the client record changes the visittype or counselor field drops down - only have the GotFocus event set to one combobox at the moment - unless I move the cursor...
3
3917
by: Ranman | last post by:
Hi all, I have a simple problem that hopefully has a simple solution, but I have yet to figure it out. In a patient database, I have a physician test order form that populates a report that is then printed and mailed out or faxed. It would be nice to have the doc's electronic signature show up on this report, but we have 4 or 5 docs that order tests. So, I would like to use a combo box on this form to select from a
6
2072
by: B Love | last post by:
I am wondering if I can have a dynamically generated report based upon the results of a query (in Access2000). Any ideas? Related to that (if that cannot be done) can the output of a query generate a set of records in form view. ( The second request sounds even more impossible to the first!) . Thanks for any insight you can share with me! ~Bruce
11
3884
by: James P. | last post by:
Hello, I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High? Any suggestion is greatly appreciated, James
5
5168
by: johnp | last post by:
Hello Everyone, Someone asked me today if it was possible to update data in a table via a report. I saw one thread where someone indicated the solutions.mdb had a report that did it but I didn't see it. Does anyone have experience doing this? Any information is appreciated.
1
5244
by: mstery | last post by:
I have a report generated via an ID selection made in a dropdown on a form. The report filters by an on click event in a preview report button on the form. Everything in the report, including subreports, filters perfectly, with the exception of a running sum DLookup field on the main report. This field looks up a value in a foreign table. I'm not clear where I'm supposed to be filtering this field, since it obviously isn't picking up the...
1
1397
by: Hifni Shahzard | last post by:
Hi, I'm using VS.NET 2003, SQL Server 2000, Windows xp professional; My Question: Some of you might seen in some websites where it requests the Country in a dropdown. If the Country selected, it gives all States of that Country in an another Dropdown called States. For Example if I selected my country as England, it gives all the states in England in the States Dropdown. In this regard, State is dependent on the Country Selected from...
3
2094
by: pv1 | last post by:
Hello, I am somewhat new to Access and vba, but am trying to complete a request that has been made of me. Access version 2002 WindowsXP. At this point these text boxes are bound to the table memo field. I have located Stephen Lebans code to limit enter of text field based on characters entered and code to limit text based upon width of a text box (this seems to be most applicable for single line text box). I am have trouble putting...
11
1848
by: radink | last post by:
Hey All, I have a report that I would like to show a word on based on if a field is checked in a form. For example. The form has a check box called Fee. If that is checked, I want the word Paid to show up in the report. If it's not checked, then I want it to not show. Thanks for any help!
0
8390
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8911
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8597
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8667
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7428
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6222
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5692
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4402
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2048
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.