Adding (All) Options to Combo Box crashes Access (1 Viewer)

daniel.winson

Registered User.
Local time
Today, 10:05
Joined
May 28, 2009
Messages
18
Hi everyone,

I tried to implement an (All) option to my combo box as per this article
http://msdn.microsoft.com/en-us/library/bb457185.aspx. I thought I followed it exactly but for some reason when I try to open my form or the subform it crashes Access.

! was hoping someone could test it (I am using Access 2007) to see if it is my database or my computer at fault.

If it is the database I'd love to know what I am doing wrong and how to fix it, or an alternative way of adding all available options. Thanks heaps.

dan
 

Attachments

  • ms contacts_Backup1338.zip
    120 KB · Views: 117

khawar

AWF VIP
Local time
Today, 14:05
Joined
Oct 28, 2006
Messages
870
Where is the combo to which all is addedd
 

khawar

AWF VIP
Local time
Today, 14:05
Joined
Oct 28, 2006
Messages
870
Here is the alternate option without using vba
 

Attachments

  • ms contacts_Backup1338.zip
    127 KB · Views: 133

daniel.winson

Registered User.
Local time
Today, 10:05
Joined
May 28, 2009
Messages
18
thanks very much for the reply, but the attached database gives me an error "The number of columns in the two selected tables or queries of a union do not match"
 

khawar

AWF VIP
Local time
Today, 14:05
Joined
Oct 28, 2006
Messages
870
Uploaded again
 

Attachments

  • ms contacts_Backup1338.zip
    122.9 KB · Views: 123

daniel.winson

Registered User.
Local time
Today, 10:05
Joined
May 28, 2009
Messages
18
Sorry, this is giving me a different error now... "You cannot add or change a record because a related record is required in table 'locations'"...

<All> is now showing up in the combobox though, so it looks like you get what I am trying to do. It just seems to be failing when trying to create the records?
 

daniel.winson

Registered User.
Local time
Today, 10:05
Joined
May 28, 2009
Messages
18
I found where you had added the option using a union query, I suspect that this isn't going to do what I want (and chances are neither was the VB method I was trying)...

I possibly didn't expain it very clearly here, I've attempted it again under the forms help forum with hopefully better wording. http://www.access-programmers.co.uk/forums/showthread.php?p=850750#post850750

thanks for your help though, I think your alternate method would have worked if my original method was the right one for this task.
 

Users who are viewing this thread

Top Bottom