My Assistant
![]() ![]() |
|
|
Mar 23 2007, 01:22 PM
Post
#1
|
|
|
UtterAccess Addict Posts: 273 |
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.
Attached File(s)
|
|
|
|
Mar 23 2007, 02:01 PM
Post
#2
|
|
|
UtterAccess Editor Posts: 13,753 From: England (North East / South Yorks) |
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 |
|
|
|
Mar 23 2007, 02:05 PM
Post
#3
|
|
|
UtterAccess Addict Posts: 273 |
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. |
|
|
|
Mar 23 2007, 02:09 PM
Post
#4
|
|
|
UtterAccess Editor Posts: 13,753 From: England (North East / South Yorks) |
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. :-) |
|
|
|
Mar 23 2007, 02:24 PM
Post
#5
|
|
|
UtterAccess Addict Posts: 273 |
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?
Attached File(s)
|
|
|
|
Mar 23 2007, 02:36 PM
Post
#6
|
|
|
UtterAccess Editor Posts: 13,753 From: England (North East / South Yorks) |
Perhaps this is what you were after?
(Not sure)
Attached File(s)
|
|
|
|
Mar 23 2007, 03:15 PM
Post
#7
|
|
|
UtterAccess Addict Posts: 273 |
Yes, actually that looks much better. What did I do wrong?
|
|
|
|
Mar 23 2007, 03:17 PM
Post
#8
|
|
|
UtterAccess Addict Posts: 273 |
ahh, I was looking at the power supply ID, not the power supply serial. Thanks for the help!!
|
|
|
|
Mar 23 2007, 03:18 PM
Post
#9
|
|
|
UtterAccess Editor Posts: 13,753 From: England (North East / South Yorks) |
You're welcome.
|
|
|
|
Mar 23 2007, 03:20 PM
Post
#10
|
|
|
UtterAccess Addict Posts: 273 |
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?
|
|
|
|
Mar 25 2007, 02:47 PM
Post
#11
|
|
|
UtterAccess Editor Posts: 13,753 From: England (North East / South Yorks) |
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. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 24th May 2013 - 07:03 PM |