cascading combo not working

L

Lonnie

Ok, im creating my cascading combo using the process from this website:
http://www.fontstuff.com/access/acctut10.htm
I am doing style #1, with a table for each selection


My box #1(MACHINE) reads fine, but when selecting, it brings up no value
(blank) for box #2 (REASON)

Here's my after update for box 1 (MACHINE)


Private Sub MACHINE_AfterUpdate()
On Error Resume Next
Select Case MACHINE.Value
Case "TURRET"
REASON.RowSource = "tblrturret"
Case "PLASMA"
REASON.RowSource = "tblrplasma"
Case "SAW"
REASON.RowSource = "tblrsaw"
End Select
End Sub

each table has only one field with many entries. Any hints?
 
L

Linq Adams via AccessMonster.com

On the face of it the code seems fine. You're sure the RowSourceType is set
to Table/Query?

What version/service pack are you running? Is it 2003/SP3?

I notice you have an affinity for using all Caps. One of the most common bug
reported with this service pack involves comboboxes with disappearing data!
The field(s) in the cbo, in the underlying table, have some kind of
formatting in place. This is often the simple > used to force UpperCase.
Remove any formatting from the fields and things should work short term, but
the definitive solution is to install the hotfix for SP3.

Here's a link to Allen Browne's site where you can find the latest news about
these bugs, as well a link to the Hotfix:

http://allenbrowne.com/bug-Access2003SP3.html
 
M

Mr. B

Lonnie,

Not withstanding what Linq has suggesated, on the surface there does not
seem to be anything that just jumps out as being the problem.

I would suggest that you first comment out the "On Error Resume Next"
statement and then put a breakpoint at the start of your Case statement.
Then run your application and make a selection from the first combo box and
then step through your code and see if you can catch the problem. One
problem with Case statements is that we humans do not type in the exact value
for the Case statement that we have selected from our combo box. Check both
values to see that they match.

Also check the spelling of all of the table names. I know that sounds over
simplified, but it has happened to me.

If none of the above prove to be the case, then you may have a corrupt form.
To test this, creaate your two combo boxes on a new form and see if they
work. I have also seen this type of problem.

Wish I could be of more help.
 
L

Lonnie via AccessMonster.com

well, running 2007, im not sure why, but it doesn't name the combo boxes
cboBlahblah, or tables tblBlahblah---- so taking the prefixes off helped.

Mr. B, it ended up being a corrupt form--- per your suggestion, i created a
new form with the same info on it, and "wallah!"

Thank you both for your help in solving this headache!
 
L

Lonnie via AccessMonster.com

thank you Linq, running 2007, was having issues with naming, that solved, it
ended up being a corrupt form--- thank you for your suggestions/help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top