UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Assign Value To Bound Combobox Based On Another Form Textbox, Office 2007    
 
   
Tiesto_X
post Apr 17 2012, 05:41 AM
Post #1

UtterAccess Veteran
Posts: 330



Hi,

I'm trying to use this code OnOpen event:

CODE
Me!cboName.Value = Forms!FormName!txtName.Value


And I get error: You can't assign a value to this object.

cboName is Bound
txtName is Unbound

When I try this:
CODE
Me!cboName.DefaultValue = Forms!FormName!txtName.Value


ComboBox value is ok, but Record is not added when I close/save record.
And when I pick value from Combobox and save, record it is added.

Since I need this combobox disabled, users will not be able to pick value.

Thanks in advance.
Go to the top of the page
 
+
accesshawaii
post Apr 17 2012, 06:12 AM
Post #2

UtterAccess VIP
Posts: 4,599
From: From Hawaii - Now in Wisconsin...Am I Nuts?



First question. Why are you trying to do it this way?
Go to the top of the page
 
+
Tiesto_X
post Apr 17 2012, 06:29 AM
Post #3

UtterAccess Veteran
Posts: 330



Hi,

I want users pick values from one form and open another form filled with that values.

There are two buttons, one for Add new record and another for Changing existing record, both based on 3 Combobox criteria.

When u fill Combos and click Change button, and if record based on that values is not exists there is a message that record doesnt exist.
Also if you try to add new record and record is exist, there is a message that record based on that values exists.

Hope you got me.
Go to the top of the page
 
+
accesshawaii
post Apr 17 2012, 07:03 AM
Post #4

UtterAccess VIP
Posts: 4,599
From: From Hawaii - Now in Wisconsin...Am I Nuts?



It sounds like you don't have your tables setup correctly and normalized. You should not need to do all this. You really only nees a main form and a sub-form, which would show records for the corresponding value in the main form. Could you provide a little background on your database? Such as what is it for? eg. track customers and orders, etc.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 09:54 AM