|
-
Feb 18th, 2000, 05:48 AM
#1
Thread Starter
Lively Member
I am trying to save whatever is selected in a combobox with the following but to do that I have to find the 'ID' from one table of that selection and save it another. To start it is saying 'Too few parameters for this sql: any suggestions or examples of code that you used in saving a selection from a combo box that hooks to a different table. Thankyou I haven't gotten any replies from my last few posts and I am wondering why.
sqlAgnt = ("Select agentid from Agents where Agents.Agent = cboagent.selecteditem")
Set tbAgnt = db.OpenRecordset(sqlAgnt)
-
Feb 18th, 2000, 06:02 AM
#2
New Member
try the following line
sqlAgnt = ("Select agentid from Agents where Agents.Agent = '" & cboagent.list(cboagent.listindex) & "'". I'm not sure if this is what you are looking for without knowing a few more specifics about your progam but I bewlive this syntax is correct. Also if it makes sense, when you populate the combo box there is an "ItemData" property that may be usefull to you. Look it up in help.
Rob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|