473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Cascading Lists using a Query vs Table

I know I have asked this once before but no one answered.
I have 2 tables Action Type and Reason. I took those 2 and created 1 Query1 a.k.a Action Type vs Reason. Then created a Query so that the dropdowns will be in asending orde. I used fontstuff.com/access/acctut10 for help on making a Cascading Lists for Access Forms but used a query in place of a table. However all I get is numbers. What can I do to fix this? My form was created useing a table called Action Log. in it it has the following fields
field1= SSN (this is used to make a relatioship w/ another From/based on a another table (MainDB)).
field2= Action Type (based on the Query 1 as a lookup field)
field3= Date
field4= Reason (based on the Query 1 as a lookup field)
field5= Notes

What I uesed:
'Placed in the After Update for Action Type
Expand|Select|Wrap|Line Numbers
  1. Private Sub [cboAction Type]_AfterUpdate()
  2.    On Error Resume Next
  3.    cboReason.RowSource = "Select [Action Type vs Reason].Reason " & _
  4.             "FROM [Action Type vs Reason] " & _
  5.             "WHERE [Action Type vs Reason].[Action Type] = '" & [cboAction Type].Value & "' " & _
  6.             "ORDER BY [Action Type vs Reason].Reason;"
  7. End Sub
Can some one see what I am doing wrong please?
Sep 21 '10 #1
9 1872
Please Note the the Action Log is many Action Types w/ a Reason connected to one Main person via SSN.
Sep 21 '10 #2
dsatino
393 256MB
What do the number represent? Are they part of the query that's behind the dropbox?
Sep 23 '10 #3
The number represent the ID's Actions Type # are from the tblAction Type and Reason #'s are from the query.
But I have since removed the ID's on the tblAction Type and tblReason.
How do I create a Cascading Lists useing a Query from the begining?
Sep 24 '10 #4
Ok it has been 5 days. Is there a way to do this or not?
Sep 30 '10 #5
MMcCarthy
14,534 Expert Mod 8TB
OK Susan, to get back to your original question. The reason you were seeing numbers instead of the values is because you didn't set the width of the first column to 0 in the properties. So assuming a dropdown has two columns and you want the second column to show, in the format properties you set the column count to 2 and the column widths to 0cm;5cm I just used five as an example here.

For a comprehensive tutorial on how cascading combo/list boxes work have a look at this insight.
Cascading Combo/List Boxes
Sep 30 '10 #6
I did that along time ago. The issue is because the action types and reasons are place in a query so then set as a look up in tblAction Log.
Oct 4 '10 #7
MMcCarthy
14,534 Expert Mod 8TB
Susan

I can't follow what you are saying. Can you attach the form and any relevent queries and tables in a database. Zip the file and then attach it.

Mary
Oct 5 '10 #8
No I can't. There is PII on it.
Oct 5 '10 #9
NeoPa
32,556 Expert Mod 16PB
Susan, you may need to give a fuller answer. I have no idea what you mean for instance. Instructions for attaching a database follow below :

When attaching your work please follow the following steps first :
  1. Remove anything not relevant to the problem. This is not necessary in all circumstances but some databases can be very bulky and some things do not effect the actual problem at all.
  2. Likewise, not entirely necessary in all cases, but consider saving your database in a version not later than 2003 as many of our experts don't use Access 2007. Largely they don't want to, but some also don't have access to it. Personally I will wait until I'm forced to before using it.
  3. If the process depends on any linked tables then make local copies in your database to replace the linked tables.
  4. If the database includes any code, ensure that all modules are set to Option Explicit (See Require Variable Declaration).
  5. If you've done anything in steps 1 to 4 then make sure that the problem you're experiencing is still evident in the updated version.
  6. Compile the database (From the Visual Basic Editor select Debug / Compile {Project Name}).
  7. Compact the database (Tools / Database Utilities / Compact and Repair Database...).
  8. Compress the database into a ZIP file.
  9. When posting, scroll down the page and select Manage Attachments (Pressing on that leads you to a page where you can add or remove your attachments. It also lists the maximum file sizes for each of the allowed file types.) and add this new ZIP file.
It's also a good idea to include some instructions that enable us to find the issue you'd like help with. Maybe some instructions of what to select, click on, enter etc that ensures we'll see what you see and have the same problems.
Oct 5 '10 #10

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

Similar topics

6
by: dummie_q | last post by:
Hey, I am having some confusion about how to formulate this particular query. I have 2 tables. Table A has 4 columns say a1,a2,a3,a4 with the columns a1,a2,a4 forming the primary key. Table B...
6
by: visionstate | last post by:
Hi there, I am building a database that requires cascading lists on a form. I currently have (I may be adding more later) 3 combo boxes on my form - Department, Surname and Forename. The user...
0
by: pmc1 | last post by:
Hi, I have a table (tblResults) that was created uning a make table query. I will be using the table to export the results of the query to a csv file. Every field in the first 2 columns of...
8
by: tonywinslow1986 | last post by:
I'm reading MIT's book "Introduction to Algorithms". The following is one of the excercises from it: < 10.2-8 Explain how to implement doubly linked lists using only one pointer value np per...
4
by: Michael R | last post by:
Hi. I'm currently dealing with the following: I need a drop box that will have in it a certain range of accending consuquential numbers for ex: 1, 2, 3, 4, 5, 6, 7. The min and the max number...
3
manoj9849967222
by: manoj9849967222 | last post by:
HI All I have two tables One is "master" & the other one is "child". The master Table have filds Productcode -----Number Productname-------Text Child Table
0
debasisdas
by: debasisdas | last post by:
This thread contains some useful tips for using External tables. USING EXTERNAL TABLE ======================= 1.THE TABLE POINTS TO EXTERNAL FILE. IF DATA IS ALTERED IN THE EXTERNAL FILE,DATA...
3
kcdoell
by: kcdoell | last post by:
Hello: I have been struggling with building a cascading list on a form that I created. My problem is that I am getting a "Datatype Mismatch in criteria expression" error that I can not seem to...
12
by: SusanK4305 | last post by:
I have looked around and can't find any thing on this. This is what I have Table A (Actions) Approved Pending ect... ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...

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.