473,569 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo Box Error in Row Source

132 New Member
I have a subform with 2 drop down boxes. The choices in the 2nd drop down box depend on the value of the first . When I run the subform on its own, it all works beautifully. However, when the I run the main form that calls the subform, I get a one of those parameter input required messages. As Greg Brady would say, "what gives"? Here is the code (query) from the subform:

SELECT SecondaryDisord er.[Secondary Disorder]
FROM SecondaryDisord er
WHERE (((SecondaryDis order.[Primary Disorder])=[forms]![case subform]![combo86]));
Jun 4 '07 #1
36 2375
Rabbit
12,516 Recognized Expert Moderator MVP
I have a subform with 2 drop down boxes. The choices in the 2nd drop down box depend on the value of the first . When I run the subform on its own, it all works beautifully. However, when the I run the main form that calls the subform, I get a one of those parameter input required messages. As Greg Brady would say, "what gives"? Here is the code (query) from the subform:

SELECT SecondaryDisord er.[Secondary Disorder]
FROM SecondaryDisord er
WHERE (((SecondaryDis order.[Primary Disorder])=[forms]![case subform]![combo86]));
The syntax to refer something on a subform is Forms!SubformCo ntrol.Form.Cont rol
Jun 4 '07 #2
Proaccesspro
132 New Member
The syntax to refer something on a subform is Forms!SubformCo ntrol.Form.Cont rol

I updated the SQL on the subform......sa me error!!!

SELECT SecondaryDisord er.[Secondary Disorder]
FROM SecondaryDisord er
WHERE (((SecondaryDis order.[Primary Disorder])=[forms]![SubformControl].[case subform].[combo86]));
Jun 4 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
I updated the SQL on the subform......sa me error!!!

SELECT SecondaryDisord er.[Secondary Disorder]
FROM SecondaryDisord er
WHERE (((SecondaryDis order.[Primary Disorder])=[forms]![SubformControl].[case subform].[combo86]));
[case subform] is the subform control.
Form stays as is.

I should've been more clear.

[Forms]![case subform].Form.[combo86]
Jun 4 '07 #4
Proaccesspro
132 New Member
[case subform] is the subform control.
Form stays as is.

I should've been more clear.

[Forms]![case subform].Form.[combo86]

I'm still confused......I n your example, what goes in place of the word Form? Would it be the the Main form??

In my DB, Main Form is the Main form and Case Subform is the subform.
Jun 4 '07 #5
Rabbit
12,516 Recognized Expert Moderator MVP
I'm still confused......I n your example, what goes in place of the word Form? Would it be the the Main form??

In my DB, Main Form is the Main form and Case Subform is the subform.
Nothing would go in Form. Form stays as is.
Jun 4 '07 #6
FishVal
2,653 Recognized Expert Specialist
Hi!

It's very simple.
When you open form as subform, it will not be added to collection 'Forms".
So referencing like "Forms!frmSubFo rm.Controls!ctr Name" will return value when frmName is open as independant form.
If it is open as subform the valid reference will be "Forms!frmMainF orm.Controls!fr mSubForm.Form!C ontrols!ctrName ".
Jun 4 '07 #7
Proaccesspro
132 New Member
Nothing would go in Form. Form stays as is.
Well....Access put brackets around FORM, but it still does not work. Here is the code in the query:

[Forms]![case subform].[Form].[combo86]
Jun 4 '07 #8
Rabbit
12,516 Recognized Expert Moderator MVP
Are you trying to do this from the after update event of the combobox? Because that's where you have to do it from.

You can't just set the control source of the combobox to that SQL statement because it will never update.

And you said the "code (query) from the subform", I assume this is in reference to the row source of the combo box.
Jun 4 '07 #9
Proaccesspro
132 New Member
Hi!

It's very simple.
When you open form as subform, it will not be added to collection 'Forms".
So referencing like "Forms!frmSubFo rm.Controls!ctr Name" will return value when frmName is open as independant form.
If it is open as subform the valid reference will be "Forms!frmMainF orm.Controls!fr mSubForm.Form!C ontrols!ctrName ".
Where would I place this code??
Jun 4 '07 #10

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

Similar topics

9
19461
by: Bob Alston | last post by:
I have a drop down combo box that gives the user to enter an item not in the list by adding it to the list. The list is a table. It works fine on Access2003 but fails on Access2002/XP. ON XP, it seems to work, shows the message that the entry has been added, then I get an Access error saying the item is not in the list. Here is my code: ...
4
1800
by: Larry Tate | last post by:
I am wanting to get those cool html error pages that ms produces when I hit an error in asp.net. For instance, when I get a compilation error I get an html error page that shows me the Description: Compiler Error Message: Source Error: Source File: The main thing I want is the Source Error. This give me a few lines of the
2
1867
by: MLH | last post by:
I invoked the combo-box wizard today, telling it to use a 4-table union query as a row-source for the combo-box it was assisting me in building. The error I got was without number and stated, "Data cannot be retrieved from the source you have selected. You must select a different table or query to continue in the wizard." just after I chose...
2
948
by: Eric | last post by:
Hello, I'm a little green in this area, so any suggested reading or examples is appreciated. In my release version of managed code, is there a way to know what command caused an exception? I know the message and source of the exception using the exception object. Is there a way to get the IL offset, so I know which command caused the
0
1732
by: Stimp | last post by:
I've created an aspx page called HistoryManage.aspx. The page works fine on my local machine but when I load it off the web I get the following strange error... Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and...
21
8526
by: Mark Rae | last post by:
Hi, I have an ASP.NET 2 web application (not web site) project and am using a web deployment project to deploy to the testing, then the production server. All has been working well for months now, but today after a recompilation, the app is throwing the error below when accessing a certain page, although there are no errors in the...
3
4739
by: John | last post by:
AC2007 I changed my combo's row source and then the autocomplete stopped working. The combo is two columns, bound to the first. First column is primary key (ID). Second column is a concatenation of two fields (Descrip & UserID). When I start typing letters of an existing description (Descrip), the combo does not autocomplete. If I...
0
1209
bajajv
by: bajajv | last post by:
Hi, I am working with C++ builder 2007 and getting this error many times. Source file not found Forms.pas. Any idea what is this and how to solve this?
3
1488
by: Gord | last post by:
Is it possible to somehow add the option of "All" at the top of the list of a combo's drop down list? I'm hoping I don't have to go and re-jig the underlying table and/or query that the list is based on to get this to appear at the top of the list and can force it to happen directly with the combo box. Thanks, Gord
0
945
by: Ajobi Mike | last post by:
Error : Source file or directory missing or cannot be read. I got the above error while installing my SQL 2000 Server from a folder already copied on my desktop. Please how can I solve this problem so that I can install my SQL server Thanks
0
7612
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...
0
7924
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. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
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...
0
7968
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...
1
5512
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...
0
5219
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...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.