Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / August 2006

Tip: Looking for answers? Try searching our database.

cascading combos

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sue R - 28 Jul 2006 16:55 GMT
I've read through and tried numerous ideas posted here and other sites for
Cascading combos but still must be doing something wrong so any help is
appreciated.

I have a simple database with 2 tables
tblMain ( all employee fields)
tbl Unit (Department, Unit)

this is my latest attempt from postings I've found -

I have a form (frmEmployeeInfo) with two combo boxes.
cbxDepartment
Row Source Type - Table/Query
Row Source - SELECT DISTINCT tblUnit.Department FROM tblUnit ORDER BY tblUnit.
Department;
Column Count - 1
Bound column - 2
After Update - Private Sub cbxDepartment_AfterUpdate()
 On Error Resume Next
  cbxUnit.RowSource = "Select tblUnit.Unit " & _
           "FROM tblUnit " & _
           "WHERE tblUnit.Department = '" & cbxDepartment.Value & "' " & _
           "ORDER BY tblUnit.Unit;"
End Sub

cbxUnit
Row Source Type - Table/Query
Row Source -
Column Count - 1
Bound Column - 1
After Update - none

Thank you for any help, it is greatly appreciated.
Sue
Bill Mosca - 28 Jul 2006 17:12 GMT
Sue

You have the bound column fo rthe department set to 2. It should be 1. You
only have one field in the rowsource.
Signature

Bill Mosca, Microsoft Access MVP

> I've read through and tried numerous ideas posted here and other sites for
> Cascading combos but still must be doing something wrong so any help is
[quoted text clipped - 30 lines]
> Thank you for any help, it is greatly appreciated.
> Sue
Sue R - 28 Jul 2006 18:40 GMT
I had tried switching that ...I tried again and it allows one of the
department names to show up in the combo box but nothing in the drop down.

Sue

>Sue
>
[quoted text clipped - 5 lines]
>> Thank you for any help, it is greatly appreciated.
>> Sue
Bill Mosca - 28 Jul 2006 22:57 GMT
Your rowsource looks right. And the bound column HAS to be 1 because you have
only one field in the rowsource query.

How many distinct Departments are in tblUnit?

Signature

Bill Mosca, Microsoft Access MVP

> I had tried switching that ...I tried again and it allows one of the
> department names to show up in the combo box but nothing in the drop down.
[quoted text clipped - 10 lines]
> >> Thank you for any help, it is greatly appreciated.
> >> Sue
Sue R - 31 Jul 2006 14:41 GMT
there are 13 different departments listed in the table with 59 records.   The
one that does show up is somewhere in the middle.   Column 1 - Department,
Column 2 - Unit, I also have a Column 3 - Department ID that I'm not using
for anything anymore but had added to try to get things working using ID's
based on another table instead.

Thanks
Sue

>Your rowsource looks right. And the bound column HAS to be 1 because you have
>only one field in the rowsource query.
[quoted text clipped - 6 lines]
>> >> Thank you for any help, it is greatly appreciated.
>> >> Sue
Bill Mosca - 31 Jul 2006 17:30 GMT
This is strange. The SQL you posted should show each department if you have
teh bound column set to 1.

What happens if you run the rowsource as a query? Do you get the expected
results?
Signature

Bill Mosca, Microsoft Access MVP

> there are 13 different departments listed in the table with 59 records.   The
> one that does show up is somewhere in the middle.   Column 1 - Department,
[quoted text clipped - 15 lines]
> >> >> Thank you for any help, it is greatly appreciated.
> >> >> Sue
Sue R - 01 Aug 2006 15:40 GMT
Still doesn't work...maybe something wrong with my relationship setup?...can
you tell me how I should have them set?

Thanks
Sue

>This is strange. The SQL you posted should show each department if you have
>teh bound column set to 1.
[quoted text clipped - 6 lines]
>> >> >> Thank you for any help, it is greatly appreciated.
>> >> >> Sue
Bill Mosca - 01 Aug 2006 16:56 GMT
Are you saying th equery is not working when you run it in the query window?

This has nothing to do with relationships since you are using only one table.

Would it be possible to send me a zipped sample db that contains your form
and the table? My email address is wrmosca at myself dot com

Signature

Bill Mosca, Microsoft Access MVP

> Still doesn't work...maybe something wrong with my relationship setup?...can
> you tell me how I should have them set?
[quoted text clipped - 12 lines]
> >> >> >> Thank you for any help, it is greatly appreciated.
> >> >> >> Sue
Bill Mosca - 01 Aug 2006 19:35 GMT
I found your problem right away. You had set the column widths so that the
first column was 0”. That hides it. I corrected the column widths and all
appears to be working.

Signature

Bill Mosca, Microsoft Access MVP

> Still doesn't work...maybe something wrong with my relationship setup?...can
> you tell me how I should have them set?
[quoted text clipped - 12 lines]
> >> >> >> Thank you for any help, it is greatly appreciated.
> >> >> >> Sue
Sue R - 01 Aug 2006 19:51 GMT
You are my HERO!  I am so grateful - Thank you  :)))

>I found your problem right away. You had set the column widths so that the
>first column was 0”. That hides it. I corrected the column widths and all
[quoted text clipped - 5 lines]
>> >> >> >> Thank you for any help, it is greatly appreciated.
>> >> >> >> Sue
Bill Mosca - 01 Aug 2006 20:44 GMT
My pleasure, Sue.

Signature

Bill Mosca, Microsoft Access MVP

> You are my HERO!  I am so grateful - Thank you  :)))
>
[quoted text clipped - 7 lines]
> >> >> >> >> Thank you for any help, it is greatly appreciated.
> >> >> >> >> Sue
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2012 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.