All, I'm stepping back into coding after a 5 year layoff so bare with me. I'm working on some access code that was converted from 2000 to 2010. One field is a textbox and it's control source is the following...
=IIf([InternationalChk]=Yes,"Lease","County")
'InternationalChk' is the field in the recordset that is a yes/no in the database.
In the 2000 version, as soon as the user checks the checkbox the values change between Lease and County. There is no code that I can find that changes the values. In 2010, after the user checks the checkbox I have to exit out of this form and come back in. Ok, i'm thinking about this as I'm typing, the new version in 2010 is linking tables to SQL. Could there some sort of delay from the value changing in the database and for some reason the form is not seeing it until it loads again? Why would the 2000 version, just using Access, change the values immediately?
So I was trying to write some code when the checkbox is checked but I keep getting an error.. 'You can't assign a value to that object'
Sorry, to ramble on, so my questions are:
1) Why can't I assign a value to a textbox in my VBA code - me.countlease.text = 'lease (this is what throws the error you can't assign a value to that object
2) Why does the older version of Access change the values of the textbox and the new version does not if no code was changed.
Thanks for any help and tips in advance.
Kyle Fitzgerald
=IIf([InternationalChk]=Yes,"Lease","County")
'InternationalChk' is the field in the recordset that is a yes/no in the database.
In the 2000 version, as soon as the user checks the checkbox the values change between Lease and County. There is no code that I can find that changes the values. In 2010, after the user checks the checkbox I have to exit out of this form and come back in. Ok, i'm thinking about this as I'm typing, the new version in 2010 is linking tables to SQL. Could there some sort of delay from the value changing in the database and for some reason the form is not seeing it until it loads again? Why would the 2000 version, just using Access, change the values immediately?
So I was trying to write some code when the checkbox is checked but I keep getting an error.. 'You can't assign a value to that object'
Sorry, to ramble on, so my questions are:
1) Why can't I assign a value to a textbox in my VBA code - me.countlease.text = 'lease (this is what throws the error you can't assign a value to that object
2) Why does the older version of Access change the values of the textbox and the new version does not if no code was changed.
Thanks for any help and tips in advance.
Kyle Fitzgerald