InoAccess
Mar 23 2007, 01:22 PM
Will someone download this sample database and tell my why I cant select a "power supply" in the "generators" table? It's a combobox. When I choose a power supply, it tells me that I cant select a record because a related record is required in the related table.
To see some background on what i'm trying to do click
HERE. Thanks in advance for the help.
LPurvis
Mar 23 2007, 02:01 PM
First of all you're using lookup list fields in tables.
I can only suggest that you don't.
(http://www.mvps.org/access/lookupfields.htm)
Your updates should be through a form.
That said - in a table or in a form - you'll need your bound column to be 1 - not 0 :-S
InoAccess
Mar 23 2007, 02:05 PM
QUOTE
First of all you're using lookup list fields in tables.
I can only suggest that you don't.
(http://www.mvps.org/access/lookupfields.htm)
Your updates should be through a form.
That said - in a table or in a form - you'll need your bound column to be 1 - not 0 :-S
So I shouldnt make the combobox part of the field property in the table? I did that so that when I create the form it already comes up as a combobox instead of having to re-create it. Is that bad?
And why would the bound column be 1? I thought the key is what should be bound?
Edited by: InoAccess on Fri Mar 23 15:06:40 EDT 2007.
LPurvis
Mar 23 2007, 02:09 PM
Yeah pretty much lol
I suppose if you reeeally wanted to save yourself that bit of form work you could create it so during development so the form's are created thusly - then remove *all* lookup info from the field itself before deployment/live use.
I know it can be a bore - changing textboxes to comboboxes etc - but it's all just part of the game. :-)
Have a read of that link.
I've never used them at all - but that link info is hopefully compelling evidence to stop. :-)
InoAccess
Mar 23 2007, 02:24 PM
QUOTE
Yeah pretty much lol
I suppose if you reeeally wanted to save yourself that bit of form work you could create it so during development so the form's are created thusly - then remove *all* lookup info from the field itself before deployment/live use.
I know it can be a bore - changing textboxes to comboboxes etc - but it's all just part of the game. :-)
Have a read of that link.
I've never used them at all - but that link info is hopefully compelling evidence to stop. :-)
Ok, I did what you said (can you check the attachement and tell me what you think?). I changed the field back to a text box in the table. Then on the form I changed it to a combobox (bound column is 1). One question though, when I run the query, it only returns the Power Supply ID field. How do I set it up to return the power supply serial number instead? Does this make sense?
LPurvis
Mar 23 2007, 02:36 PM
Perhaps this is what you were after?
(Not sure)
InoAccess
Mar 23 2007, 03:15 PM
Yes, actually that looks much better. What did I do wrong?
InoAccess
Mar 23 2007, 03:17 PM
ahh, I was looking at the power supply ID, not the power supply serial. Thanks for the help!!
LPurvis
Mar 23 2007, 03:18 PM
You're welcome.
InoAccess
Mar 23 2007, 03:20 PM
Oh, one more question about the 'bound column". Isnt the bound column the one that gets stored in the table when you make a selection in the combobox? And isnt column 0 the ID column? Is that the one that should be bound? You said column 1 should be bound, but I dont understand why?
LPurvis
Mar 25 2007, 02:47 PM
Hi
(Only just nticed this post of yours - no notification unless you reply directly to my post :-)
You're right - the column collection is zero based - but only in VBA.
Through the Access User Interface things like that are made more friendly for novice users and the columns count is consistent with the visible list.
So the bound column usually is 1 there.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.