M
MARGIE
I would like to make a field in a table that allowed only
choices from a list, and that list be based on the choice
from another list field. I have submitted this question
before and the answer I got (from Graham)didn't work
(probably me, I am lost!).
Here is what I tried:
Table Weed:
ID (text) WeedName (text) *PKey is ID
1 Musk Thistle
2 Spotted Knapweed
Table Agent:
ID(text) AgentName (text) *PKey is ID
1 Black Bug
2 Brown Bug
3 Yellow Bug
4 Red Bug
Table JointWeedAgent:
WeedID(text) AgentID(text)*PKey is both WeedID and AgentID
1 1
1 2
2 3
2 4
Table Release Data:
ID - AutoNumber
Date - Date
Site Name - Text
Target Weed - Look-up from Weed.WeedName
Number Released - Number
Agent - Text
Query qryWeedAgent:
Agent.ID, Agent.AgentName, Weed.WeedID
Then I made a form from the DATA table including all
fields. In design mode, I entered this code in the
AfterUpdate event procedure of Target Weed:
cboSelectAgent.RowSource= "Select * from qryWeedAgent where
WeedID=" _ & Nz(cboSelectWeed,0)
When I enter the form and choose a Weed name from the list,
I am sent to the debugger and it says "Syntax error -
Invalid Character" and highlights the "_". If I delete it,
I get "expected object" after the "&".
If anyone can help I would much appreciate any help. I am
only partially skilled in Access, and Visual Basic is
foreign to me ... so please explain as if I were a 10 year old!
Thanks!!!!
choices from a list, and that list be based on the choice
from another list field. I have submitted this question
before and the answer I got (from Graham)didn't work
(probably me, I am lost!).
Here is what I tried:
Table Weed:
ID (text) WeedName (text) *PKey is ID
1 Musk Thistle
2 Spotted Knapweed
Table Agent:
ID(text) AgentName (text) *PKey is ID
1 Black Bug
2 Brown Bug
3 Yellow Bug
4 Red Bug
Table JointWeedAgent:
WeedID(text) AgentID(text)*PKey is both WeedID and AgentID
1 1
1 2
2 3
2 4
Table Release Data:
ID - AutoNumber
Date - Date
Site Name - Text
Target Weed - Look-up from Weed.WeedName
Number Released - Number
Agent - Text
Query qryWeedAgent:
Agent.ID, Agent.AgentName, Weed.WeedID
Then I made a form from the DATA table including all
fields. In design mode, I entered this code in the
AfterUpdate event procedure of Target Weed:
cboSelectAgent.RowSource= "Select * from qryWeedAgent where
WeedID=" _ & Nz(cboSelectWeed,0)
When I enter the form and choose a Weed name from the list,
I am sent to the debugger and it says "Syntax error -
Invalid Character" and highlights the "_". If I delete it,
I get "expected object" after the "&".
If anyone can help I would much appreciate any help. I am
only partially skilled in Access, and Visual Basic is
foreign to me ... so please explain as if I were a 10 year old!
Thanks!!!!