Prev: Allow Temporary Edits In Form To Table Values
Next: Changed a form to have two tab control (RESOLVED)
From: Victor on 6 May 2010 16:50 I set a text box for conditional formatting based on a check box (no check - normal, checked- bold, red bg, yellow font). I did this to 6 text boxes (based on 6 check boxes). This is the code I used: [Check183].Value=-1 The first time I did one box, it worked, when I coded the other 5, I got some out of memory error and could not open up the form again. Luckily, I had a backup (that i created right before playing with this). When I did one, it didn't work, nor all 6, but it didn't give me the memory error. Any ideas? Vic
From: Marshall Barton on 6 May 2010 18:10 Victor wrote: >I set a text box for conditional formatting based on a check box (no check >- normal, checked- bold, red bg, yellow font). I did this to 6 text boxes >(based on 6 check boxes). >This is the code I used: >[Check183].Value=-1 > >The first time I did one box, it worked, when I coded the other 5, I got >some out of memory error and could not open up the form again. Luckily, I >had a backup (that i created right before playing with this). When I did >one, it didn't work, nor all 6, but it didn't give me the memory error. I would expect [Check183] = -1 to work IF you are using the Expression Is option. If it doesn't, I suspect your form is corrupted. Try creating a new blank database, set all it's options as needed (especially that Name Auto Correct is OFF), and then import everything from the problem database. -- Marsh MVP [MS Access]
From: Victor on 6 May 2010 22:10 Thank you so much. I don't know why it worked the first time (this morning) with [Check183].Value=-1 Quick question, why does it do the formating if = -1, not 1 (yes or checked)? May help me in the future :) Thanks again Marshall Barton <marshbarton(a)wowway.com> wrote in news:l8f6u5pnu8do8m8lcq0ukduadubg18ddj8(a)4ax.com: > Victor wrote: > >>I set a text box for conditional formatting based on a check box (no >>check - normal, checked- bold, red bg, yellow font). I did this to 6 >>text boxes (based on 6 check boxes). >>This is the code I used: >>[Check183].Value=-1 >> >>The first time I did one box, it worked, when I coded the other 5, I >>got some out of memory error and could not open up the form again. >>Luckily, I had a backup (that i created right before playing with >>this). When I did one, it didn't work, nor all 6, but it didn't give >>me the memory error. > > I would expect [Check183] = -1 to work IF you are using the > Expression Is option. > > If it doesn't, I suspect your form is corrupted. Try > creating a new blank database, set all it's options as > needed (especially that Name Auto Correct is OFF), and then > import everything from the problem database. >
From: John W. Vinson on 6 May 2010 23:08 On 07 May 2010 02:10:45 GMT, Victor <not(a)home.com> wrote: >Quick question, why does it do the formating if = -1, not 1 (yes or >checked)? In an Access JET/ACE backend, a Yes/No field is in fact stored as -1 for Yes, 0 for No. If the backend is SQL/Server it's possible (but not obligatory) that the field is a BIT field, with 1 being Yes and 0 being No. -- John W. Vinson [MVP]
From: Victor on 7 May 2010 09:18 Very weird. I coded it as was advised [Check183]=-1 for EXPRESSION IS. It worked. When I reopened the db up later to do some more work, it doesn't work now, but the coding for the CF is still there. ????? Can't figure this one. John W. Vinson <jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote in news:9v07u5peadoojd2mmgkgrhtu8c0717nas3(a)4ax.com: > On 07 May 2010 02:10:45 GMT, Victor <not(a)home.com> wrote: > >>Quick question, why does it do the formating if = -1, not 1 (yes or >>checked)? > > In an Access JET/ACE backend, a Yes/No field is in fact stored as -1 > for Yes, 0 for No. > > If the backend is SQL/Server it's possible (but not obligatory) that > the field is a BIT field, with 1 being Yes and 0 being No.
|
Next
|
Last
Pages: 1 2 Prev: Allow Temporary Edits In Form To Table Values Next: Changed a form to have two tab control (RESOLVED) |