Noreene Patrick
Registered User.
- Local time
- Today, 11:49
- Joined
- Jul 18, 2002
- Messages
- 223
Thanks to everyone, I have my db finished..except for 1 thing.
On my form, I have an unbound textbox that I enter associates (number). This textbox is the last part of a 3 part calculation..when I enter the number of associates the next textbox(unbound) shows calculation (textbox name is expectedcalc).
Since (I couldnt change their mind) this is a calculated field they want to save to the table, I had to put calculation in the controlsource of expectedcalc (=DateAdd("n",([Tcards]*[cbominutes]/[Associates]),0) and reference this at bound textbox named expected. Now, I put this in the controlsource because I couldnt get this calculation to work as VBA code.
me.expected.value = me.expectedcalc.value is on the associates_exit event
This is the code I used to make the reference. It works, but if I go into the associates field and take out the number after it has calculated, the me.expected.value field does not change and it causes a type mismatch and highlights the VBA code. I need to know how to make the expected field be blank if I take out the number of associates. Does that make sense? I just dont want this code to be available if a user happens to take out the number and hits enter after it has already calculated.
I have tried to put the code in associates_change event but in some of the events the code will not work..the expected textbox does not show in table.
Thanks, Noreene
On my form, I have an unbound textbox that I enter associates (number). This textbox is the last part of a 3 part calculation..when I enter the number of associates the next textbox(unbound) shows calculation (textbox name is expectedcalc).
Since (I couldnt change their mind) this is a calculated field they want to save to the table, I had to put calculation in the controlsource of expectedcalc (=DateAdd("n",([Tcards]*[cbominutes]/[Associates]),0) and reference this at bound textbox named expected. Now, I put this in the controlsource because I couldnt get this calculation to work as VBA code.
me.expected.value = me.expectedcalc.value is on the associates_exit event
This is the code I used to make the reference. It works, but if I go into the associates field and take out the number after it has calculated, the me.expected.value field does not change and it causes a type mismatch and highlights the VBA code. I need to know how to make the expected field be blank if I take out the number of associates. Does that make sense? I just dont want this code to be available if a user happens to take out the number and hits enter after it has already calculated.
I have tried to put the code in associates_change event but in some of the events the code will not work..the expected textbox does not show in table.
Thanks, Noreene
Last edited: