Can't Assign Value Error

D

David C. Holley

I'm trying to programically set the value for several controls on a
form. When the code runs, Access returns the error message 'You can't
assign a value to this control.' However, when I use the exact same
statements via the Immediate Window, the control values are set without
any error messages being thrown. Any ideas as to what's going on?
 
T

Tim Ferguson

I'm trying to programically set the value for several controls on a
form. When the code runs, Access returns the error message '

Can you post the code? What event are you using?

Tim F
 
D

David C. Holley

Duh! I was useing (basically)

Me![cboBillingMethod].DefaultValue = "Client"

When in fact it should have be

Me![cboBillingMethod].DefaultValue = Chr(34) & "Client" & Chr(34)

The other statements setting the DefaultValue worked because they deal
with integers.
 
Top