By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,646 Members | 1,175 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,646 IT Pros & Developers. It's quick & easy.

ChkBox and TxtBox Problem

P: n/a
DD
I have a subform on a form
In the subform i have a chkBox=[BuffetDinner] and a txtbox=[Dinner40]
The idea is you Chk [Buffet Dinner] and the price $40.00 is
automaticly entered into [Dinner40]
The chkBox has code

Private Sub BuffetDinner_Click()
'Automaticly applies $40.00 into Dinner40 txtbox

If ([BuffetDinner]) = True Then
Me![Dinner40] = 40
Else
Me![Dinner40] = 0
End If
End Sub
This all works fine, until i close the form and reopen ONLY TO FIND
Dinner40 is $0.00
and [Buffett Dinner] is REMAINS Chktrue.
Removing the Me![Dinner40] = 0 does not solve the problem
Can anyone help??
Thanks
DD
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Is the text box [Dinner40] bound to a field on the sub form's record source?
I'd first check the table to see if the the field [Dinner40] has got the
value of 40 in it for that record. If it has, it might mean that the text
box on your sub form is not bound to the table or the field [Dinner40] is
not included in the record source for the sub form.

Stewart

"DD" <da**********@bigpond.com.au> wrote in message
news:14**************************@posting.google.c om...
I have a subform on a form
In the subform i have a chkBox=[BuffetDinner] and a txtbox=[Dinner40]
The idea is you Chk [Buffet Dinner] and the price $40.00 is
automaticly entered into [Dinner40]
The chkBox has code

Private Sub BuffetDinner_Click()
'Automaticly applies $40.00 into Dinner40 txtbox

If ([BuffetDinner]) = True Then
Me![Dinner40] = 40
Else
Me![Dinner40] = 0
End If
End Sub
This all works fine, until i close the form and reopen ONLY TO FIND
Dinner40 is $0.00
and [Buffett Dinner] is REMAINS Chktrue.
Removing the Me![Dinner40] = 0 does not solve the problem
Can anyone help??
Thanks
DD

Nov 12 '05 #2

P: n/a
DD wrote:
I have a subform on a form
In the subform i have a chkBox=[BuffetDinner] and a txtbox=[Dinner40]
The idea is you Chk [Buffet Dinner] and the price $40.00 is
automaticly entered into [Dinner40]
The chkBox has code

Private Sub BuffetDinner_Click()
'Automaticly applies $40.00 into Dinner40 txtbox

If ([BuffetDinner]) = True Then
Me![Dinner40] = 40
Else
Me![Dinner40] = 0
End If
End Sub
This all works fine, until i close the form and reopen ONLY TO FIND
Dinner40 is $0.00
and [Buffett Dinner] is REMAINS Chktrue.
Removing the Me![Dinner40] = 0 does not solve the problem
Can anyone help??
Thanks
DD


It appears you aren't storing the 40 dollar value to the table. In the
text field you could enter, as the control sourct,
=IIF(([BuffetDinner],40,0)
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.