473,566 Members | 3,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Synchronized boxes on the fritz - Can someone please help??!!

7 New Member
Hello, I am having an issue with my synchronized combo boxes and don't know how to fix it.

I have created two boxes and have made the synchronization work (the user clicks on the first box and makes a choice and the second only shows items which are related to the first box's choice).

My problem is that the user can not choose from any of the choices in the second combo... whatever is clicked on the very first item is the only thing that will show up. I have 48 choices in the first box (Tool Types) and 540 choices in my second box (Tool Variations - based off of the first) and would like to not have to show the user the entire list that is why I went with synchronized boxes.

The table names are as below:
Expand|Select|Wrap|Line Numbers
  1. tblToolTypeLookup:
  2. ToolTypeID: Primary Key
  3. ToolType: Text
Expand|Select|Wrap|Line Numbers
  1. tblToolVariationsLookup:
  2. ToolVariationID: PrimaryKey
  3. ToolVariation: Text
  4. ToolTypeID: Int Foreign Key Reference ToolTypeID in TblToolTypeLookup
combo box props are as below:
Combo#1 is:
Expand|Select|Wrap|Line Numbers
  1. Name: Tool_Type
  2. Control Source: Tool_Type
  3. Column Count 2
  4. Column Widths: 0";1"
  5. Row Source: tblToolTypeLookup
  6. Row Source Type: Table/Query
  7. Bound column 1
  8. After Update: Embedded Macro - Requery -> Tool Variation as Argument
Combo#2 is:
Expand|Select|Wrap|Line Numbers
  1. Name: Tool_Variation
  2. Control Source: Tool_Variation
  3. Column Count: 2
  4. Column Widths: 0";2"
  5. Row Source Type: Table/Query
  6. Bound column: 1
Below you will find my SQL.
Expand|Select|Wrap|Line Numbers
  1. SELECT tblToolTypeLookup.ToolTypeID,
  2.        tblToolVariationsLookup.[Tool Variation]
  3. FROM   tblToolTypeLookup INNER JOIN
  4.        tblToolVariationsLookup
  5.   ON   tblToolTypeLookup.ToolTypeID = tblToolVariationsLookup.ToolTypeID
  6. WHERE (((tblToolVariationsLookup.[Tool Type])=[forms]![KRDL00057 MIL FORM].[Tool_Type]));
the boxes work... per se... when the user chooses lets say "Wrenches" from the first box the second box when clicked only provides the types of wrenches...just as a synchronized box should do.

My problem is if the user chooses any item (it doesn't matter how far down on the second box) it doesn't "lock" on that item and place it in the record. It will not let the user choose anything but the first item in the list of the second combo box.

I have an embedded macro in the first combo box in the "After Update" that is Tool_Variation. requery so that when the user makes a choice combobox2 will update its listing according to the choice in combobox1.

Please help with any ideas you might have to share.

Wolf
Attached Images
File Type: jpg Problem with dropdown box2.jpg (19.7 KB, 179 views)
Sep 28 '09 #1
12 2137
NeoPa
32,564 Recognized Expert Moderator MVP
You may like to check out Example Filtering on a Form. If that doesn't help you then post back and let us know.

Welcome to Bytes!

PS. Congratulations for putting the time in to explain the question as well as you did. Lots of good info to help us understand.
Sep 28 '09 #2
Lnwolf
7 New Member
I entered the following per the example in the insight that was given to me:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Tool_Type_AfterUpdate()
  2.  
  3.   With Me![Tool_Variation]
  4.     If IsNull(Me!Tool_Type) Then
  5.       .RowSource = ""
  6.     Else
  7.       .RowSource = "SELECT [Tool Variation] " & _
  8.                    "FROM tblToolVariationsLookup " & _
  9.                    "WHERE [Tool Type]=" & Me!Tool_Type
  10.     End If
  11.     Call .Requery
  12.   End With
  13.  
  14.  
  15.   End Sub
Now my second combo box doesn't have anything in it (see attached).
Attached Images
File Type: jpg Problem with empty dropdown box.jpg (18.3 KB, 180 views)
Sep 28 '09 #3
NeoPa
32,564 Recognized Expert Moderator MVP
I would say 2 things :
  1. You have spelled the items as [Tool Variation] & [Tool Type] whereas your indications earlier were that the controls were named with underscores (_) and the fields had no break at all.
  2. You have not included the quotes (') around the string value in line #9. See Quotes (') and Double-Quotes (") - Where and When to use them for the full explanation.
Sep 28 '09 #4
ADezii
8,834 Recognized Expert Expert
@NeoPa
Hello NeoPa, the Tool_Type Combo referred to in Line #9 is Bound to the Primary Key, and the defined Relationships are:
Expand|Select|Wrap|Line Numbers
  1. [tblToolTypeLookup].[ToolTypeID]{1} ==> [tblToolVariationsLookup].[ToolTypeID]{MANY}. 
The Tool_Variation Combo Box has 2 Columns, the 1st ToolTypeID (Bound, Column Width =0), and the 2nd ToolVariation (Column Width = 2"):
Shouldn't the Syntax be:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Tool_Type_AfterUpdate()
  2.   With Me![Tool_Variation]
  3.     If IsNull(Me!Tool_Type) Then
  4.       .RowSource = ""
  5.     Else
  6.       .RowSource = "SELECT [ToolTypeID], [ToolVariation] " & _
  7.                    "FROM tblToolVariationsLookup " & _
  8.                    "WHERE [ToolTypeID]=" & Me![Tool_Type]
  9.     End If
  10.     Call .Requery
  11.   End With
  12. End Sub
or am I barking up the wrong tree?
Sep 28 '09 #5
NeoPa
32,564 Recognized Expert Moderator MVP
@ADezii
No. I think you've found another issue with the code.

Certainly the first step would be to ensure that the names of the various items used are spelt correctly. The next step would be to confirm that the RecordSource for the control actually specified the right items within it.

When both of these issues have been looked at and corrected I'm sure the OP will have found that the suggested solution works well for them.
Sep 29 '09 #6
Lnwolf
7 New Member
I guess you are both right... I should go back and rename them all the same so there is no confusion.. I have Tool Variation and Tool Type in the tables, but I have Tool_Variation and Tool_Type as the combo names... I will try your suggestions and see what happens... Thanks alot for your help. I have posted to other sites and never got so much useful (if any) feedback.
Sep 29 '09 #7
Lnwolf
7 New Member
OK... I guess I really am a newbie.... I exported all the pertinent info to another database so it wouldn't be so huge... and am attaching it..this way you can see all that is involved.... please give any help you can. I appreciate it... truly...
Sep 29 '09 #8
NeoPa
32,564 Recognized Expert Moderator MVP
I'm happy to give help where I can, but I draw the line at going through somebody's database for them. If you can explain your current problem then I'm happy to look at it with you, but I don't find that doing the work for you works very well. You learn little and continue to depend on external help.

Having said that, it seems you have a better than average ability to layout and explain your problem. Why not continue to work within the forum layout as before. I'm sure we can be of more help in that case.
Sep 29 '09 #9
Lnwolf
7 New Member
OK..thanks. I appreciate it... I will continue to post as needed..
Sep 29 '09 #10

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

Similar topics

2
14539
by: Frank | last post by:
Hi, In the javadocs regarding many of the java.util classes, it states that the classes are not synchronized, and suggest using the Collections.synchronizedX(...) methods for getting synchronized objects. However, why couldn't one simply declare: private synchronized LinkedList l; and have the variable be automatically synchronized,...
5
2781
by: Max Ischenko | last post by:
Hi, I wrote simple implementation of the "synchronized" methods (a-la Java), could you please check if it is OK: def synchronized(method): """ Guards method execution, similar to Java's synchronized keyword.
4
8043
by: Rich Sienkiewicz | last post by:
Some classes, like Queue and SortedList, have a Synchronized method which gives a thread safe wrapper object for these classes. But the lock() statement does the same thing. Is there any rules as to when to use one and not the other? For instance, if I wanted to remove an item in a SortedList, would it be better to lock() it or do it via the...
4
10853
by: chrisben | last post by:
Hi I often use Queue.Synchronized method to create a queue for multithread writing. I also know I could use SyncRoot and lock to write Queue. Could anyone here please explain to me the pros and cons between those two approaches Thanks a lo Chris
5
4897
by: norbert.thek | last post by:
Hi Can somebody tell me if I'm right or not The attribute Is like an lock(this) over the Method where i put this Attribute?! If I have two methods like:
9
6747
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the...
4
1967
by: Miguel | last post by:
I have synchronized combo boxes linking Account Type with Customer Names based on the template that Microsoft has in one of its samples databases. There are the appropriate relationships between the Account Type Table and the Customer Name Table based on the ID field, so it is the ID field which is stored in the main table. However, in the...
4
2492
by: Miguel | last post by:
I have an order entry database with two forms. One is for new orders the other is to update orders. The forms are identical except that one is strictly order entry. On both forms are three sets of sychronized combo boxes. When entering test data everything worked perfectly. I recently migrated 5,000+ records from an Excel file to the database....
1
2947
by: jmartmem | last post by:
Greetings, I have a nagging problem with client-side dynamic dependent list boxes that perhaps someone can help me troubleshoot. I have a form with a series of dynamic dependent list boxes. Making a selection from list/box A (Qtr) selects a fiscal quarter, which then refreshes the values in list/box B (Mth), which shows the 3 months in that...
0
7584
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
7893
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. ...
1
7645
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
7953
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
5485
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
5213
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
3643
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
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1202
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.