473,408 Members | 1,730 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,408 software developers and data experts.

check mark question on a form

I have made a check mark box on a form to populate text boxes. (a convience for data entery people, for same data, check mark) This form is viewed as a continuous form, and when we check mark the box, in the next form, the box is allready check marked, I want to prevent/stop that. Help!


The code:
Private Sub Check56_Click()
If Check56.Value = -1 Then
Me![Generator Name] = Me![Origin Facility]
Me![Generator Address] = Me![Origin Facility Address]
Me![Generator City] = Me![Origin Facility City]
Me![Generator State] = Me![Origin Facility State]
Me![Generator Zip] = Me![Origin Facility Zip]
Else
' don't copy data.
Me![Generator Name] = Me![Generator Name]
Me![Generator Address] = Me![Generator Address]
Me![Generator City] = Me![Generator City]
Me![Generator State] = Me![Generator State]
Me![Generator Zip] = Me![Generator Zip]
End If
End Sub

Thank you.
Mar 31 '08 #1
1 2512
Stewart Ross
2,545 Expert Mod 2GB
Hi Porkchop. A control on a continuous form is repeated down all rows. As an unbound checkbox will stay checked until you take action to change it back I think you would be better placing a command button on your form instead and linking the code to the command button's on-click event. That way you would not need the IF-THEN-ELSE you currently have.

By the way, your current IF should just be an IF-THEN. You do not need the ELSE part at all; even if you did, resetting the fields to the values they are already is completely unnecessary.

Change your checkbox to a command button, label it something like Add Details, and in its on-click event code place the statements that were in your IF:
Expand|Select|Wrap|Line Numbers
  1. Me![Generator Name] = Me![Origin Facility]
  2. Me![Generator Address] = Me![Origin Facility Address]
  3. Me![Generator City] = Me![Origin Facility City]
  4. Me![Generator State] = Me![Origin Facility State]
  5. Me![Generator Zip] = Me![Origin Facility Zip]
-Stewart
Apr 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jack | last post by:
Hi, I have a form when loaded, retrieves record from an access table. Among other fields there is a check box called FinalUpdate. This is tied to a field in Access of type Yes/No. The form...
4
by: Terry | last post by:
Hello, I am designing a form from scratch and need to know how to get a Check Box(PASS)to automatically update when the data in a Text Box (MARK), in the same form, is >=24. Using the Event...
7
by: Tony Johnson | last post by:
Can you make a check box very big? It seems like when you drag it bigger the little check is still the same size. Thank you, *** Sent via Developersdex http://www.developersdex.com ***...
11
by: chrisc | last post by:
Hello, My infamous manufacturing database continues to bane my life, mostly because I'm really stumbling around in the dark here! What I am trying to do is populate some fields automatically...
3
by: Al | last post by:
Hello, Sorry for the silly question: How do I insert Check Mark into RichTextBox? I can’t find the ascii code for it. Thanks Alex
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
5
by: starke1120 | last post by:
Im creating a check in – check out database for RF guns. I have a table that contains models. ID (primary key) Model A table that contains Gun Details ID (primary key) Model_id...
2
by: AmitKu | last post by:
<script> function CheckChange() { var mycheck = document.getElementById('test'); mycheck.check = true; } </script> <body> <form id="form1" runat="server">
11
by: Patrick | last post by:
Trying this question again in a different way and expanding it to another newsgroup. Looking for how I would do this. For an html form; Say I have three check boxes A, B, and C . When I click...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.