473,321 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

ChkBox and TxtBox Problem

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
2 1420
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Koen | last post by:
Hi, I have three objects in my form: a listbox (lstform) a subform (fsub) a txtbox (txt) The listbox lists form names that will be displayed in the subform. To do this I use the...
16
by: DataBard007 | last post by:
I have an Access97 application whose form contains many text boxes. What do I have to do in order to copy the contents of one of these text boxes to the clipboard? I want to do this so I can then...
0
by: Paul T. Rong | last post by:
There is a txtbox (time) in a switchboard, I would like to make the time txtbox visible all the time (some big forms block off the time txtbox). Thanks in advance. Paul, Bratislava, Slovakia
3
by: IceColdFire | last post by:
Hi, I am using statements of type TxtBox.Text="Hello \n Hi" But they appear in same line with special character. How to make display in TextBox in different lines.... Thanks C# Pro
0
by: Rudy | last post by:
Hello all, I have a datagrid with a checkbox as a template. I connected my two chekboxes in the template to my my datasource in the propeties menu. But I get this error flagged at line 33....
0
by: John | last post by:
Hi all, i've added a checkbox column to my datagrid using template columns, and i added a checkbox to the header for check all and uncheck all functionality. the purpose of this is to allow the...
2
by: Boki | last post by:
Hi All, // code start alert("document.all.txtbox"+valueA+".value") // end code could you please advice, can it show the value of txtbox ?
2
by: ebasshead | last post by:
Hi Everybody, I have a txtbox that populates itself when the start of the form is filled out. But sometimes I have to change the info in that specific txtbox. At the moment it wont allow me to. Is...
1
by: mailbox73 | last post by:
Hi, c# 2008 express edition. Can anyone please help me figure out why I cannot get any value from one form to another when the controls are databound. (the formY.txtbox lands up empty) in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.