Unbound Combo Box issue (1 Viewer)

andy1968

Registered User.
Local time
Today, 11:10
Joined
May 9, 2018
Messages
131
I have 2 unbound combo boxes on a form.

cmbJob

cmbWho

The after update event for cmbJob requeries cmbWho (as well as a subform).

All this works fine.

Here's the problem

If I try to add another column to cmbWho, the row source no longer recognizes the cmbJob Criteria.


I've attached 2 screen shots to show this.
 

Attachments

  • Capture.JPG
    Capture.JPG
    44.9 KB · Views: 37
  • Capture2.JPG
    Capture2.JPG
    64 KB · Views: 36

theDBguy

I’m here to help
Staff member
Local time
Today, 11:10
Joined
Oct 29, 2018
Messages
21,467
Hi,

Are you still getting the prompt while using the combobox normally?
 

andy1968

Registered User.
Local time
Today, 11:10
Joined
May 9, 2018
Messages
131
No.



If I remove the phone field, everything works great.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:10
Joined
Oct 29, 2018
Messages
21,467
Hi,

Not sure I understand your response. I asked if you’re getting a prompt (like the one you showed in your screenshots) if you use the form normally, and you answered “no.” Is this correct?

If so, then what exactly is the problem?
 

andy1968

Registered User.
Local time
Today, 11:10
Joined
May 9, 2018
Messages
131
Sorry for the confusion.


Yes, I get the prompt when using the combox in the form with the added column in the second combo box.


As soon as I remove the added column, the problem goes away.
 

moke123

AWF VIP
Local time
Today, 14:10
Joined
Jan 11, 2013
Messages
3,913
We cant see the full criteria in the screenshots.
Is there a field Job in the underlying form recordsource?
Are you trying to reference the cmbJob (not Job) in the criteria?
 

andy1968

Registered User.
Local time
Today, 11:10
Joined
May 9, 2018
Messages
131
There is a field Job in the recordsource.


The problem is not in the reference; the reference works fine up and until I add the 5th field to the cmbWho Row Source.


Here is the recordsource with the 5th field added; this doesn't work:


Code:
SELECT DISTINCT tblToDoList.Who, tblToDoList.Job, tblToDoListWho.email, tblToDoListWho.Organization, tblToDoListWho.Phone
FROM tblToDoListWho INNER JOIN tblToDoList ON tblToDoListWho.Who = tblToDoList.Who
WHERE (((tblToDoList.Job)=[Forms]![frmToDoRecall]![Job]));
Here is the recordsource with only the 4 fields that works:


Code:
SELECT DISTINCT tblToDoList.Who, tblToDoList.Job, tblToDoListWho.email, tblToDoListWho.Organization FROM tblToDoListWho INNER JOIN tblToDoList ON tblToDoListWho.Who = tblToDoList.Who WHERE (((tblToDoList.Job)=[Forms]![frmToDoRecall]![Job]));
 

JHB

Have been here a while
Local time
Today, 20:10
Joined
Jun 17, 2012
Messages
7,732
The form you refer to in the criteria need to be open, looking at you picture #2 shows that you've open a form called "Copy of frmToDoRecall", so either open the correct form or change the form name in the criteria.
 

andy1968

Registered User.
Local time
Today, 11:10
Joined
May 9, 2018
Messages
131
The right form is open.


Again, the problem only occured when adding an additional field to the combobox recordsource.

I just tried it again (for the 10th time), without making any other changes, and it worked/did not do the same thing.


Real head scratcher for me. :confused:



Thanks everyone for taking the time to respond.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:10
Joined
Oct 29, 2018
Messages
21,467
I’d say take the win. Good luck with your project.
 

andy1968

Registered User.
Local time
Today, 11:10
Joined
May 9, 2018
Messages
131
Thanks! It is really coming together.


Been tinkering on and off with Access for almost 19 years, and I think I finally made the killer app! (for me anyway)
 

Users who are viewing this thread

Top Bottom