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

Creating Records with Checkboxes on a form

I am trying to set up a form for doing metals analysis. The way my lab works is someone sends us a batch of samples and wants it tested for certain elements, for example lead and cadmium. We have the capability to test for dozens of different elements, but each batch is different and the customers want them tested for different elements. So what I am trying to do is, once the batch is logged in to the system (I have this part completed), I want to be able to click on checkboxes for the elements that I want to test for, and records be created based off of that. For example, we get a batch of 7 samples and the customer wants them to be tested for lead and cadmium. I would want to check those boxes, and have some sort of code create the records for me which would look like reportno, sampleno, analyte, analyteresult, then onto the next record. I can submit a picture of what I mean if that would help, im sure this is confusing.
Sep 13 '21 #1
3 4815
32,556 Expert Mod 16PB
Hi Zach.

Welcome to Bytes.com.

Not so complicated to understand (unusually) Zach, but sounds a great deal like a request for the work to be done for you.

What I'll do to start you off is to give you an outline of where to start from. From there, if you have specific problems, come back & ask specific questions.

What you're asking for isn't built into Access as standard. It's a perfectly reasonable approach, but requires logic to be coded into the code behind the form, and optimally a database design that supports it.

When you have the information that you require which is common to all the records you need created, as well as having checked the metals you want to populate these records with, then you need code to put that data into the correct format for whatever table you have and add those records - probably sequentially but if using SQL you could manage this in a single batch if you're clever enough with your design - using either VBA or SQL.

A SQL batch could be set up as long as you had a table which contains all the possible metals. Otherwise either VBA or SQL can be used to add the records individually in sequence.

Without knowing anything about your database structure I can go no further at this point - which is good. To get any benefit you need to get your hands dirty and start doing this yourself. We'll help when we need to but signs that you're involved & not simply looking for free work are important at this point.
Sep 13 '21 #2
455 Expert Mod 256MB
The screenshot below includes a number of checkboxes so is fairly similar to what you are describing:

You can add the functionality you want by adding code to the Click event of a checkbox control (or possibly the AfterUpdate event).
For example you could run an INSERT SQL statement to append a new record to a table or an UPDATE statement to alter an existing record
Attached Images
File Type: jpg TTSSettings.jpg (199.5 KB, 174 views)
Sep 14 '21 #3
32,556 Expert Mod 16PB
You can add the functionality you want by adding code to the Click event of a checkbox control (or possibly the AfterUpdate event).
I would strongly favour the latter as it catches changes made which are not effected by use of the mouse.

However, from my reading of the question, the trigger for the addition of the records must come after all have been checked and the operator has then confirmed the action. It isn't mentioned in any detail - just referred to. Easy enough to do, but harder to explain when the item it relates to isn't mentioned in the question. Probably some button that then triggers a batch append of all selected items.
Sep 17 '21 #4

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

Similar topics

by: Iain Miller | last post by:
Now this shouldn't be hard but I've been struggling on the best way as to how to do this one for a day or 3 so I thought I'd ask the assembled company..... I'm writing an application that tracks...
by: glenhong | last post by:
Hi I need some help here. I am running Access 2003. I have an Access DB linked (Front-end) to another Access DB (Back-end). I have a Form which has a third party grid on it. The grid is...
by: foo | last post by:
Hello, I have a form that I developed in a small simple project. The form runs fine by itself. When I try to create a new form that inherits from this form, the machine goes off in the weeds for...
by: Henrootje | last post by:
I have a continous form. That form has three checkboxes, two unbound and one (MyCheckbox1) bound to MyField. The whole form is bound to the table tblMyTable which contains the field MyField. ...
by: JHNielson | last post by:
I have a table that I would like to be able for the users to search/filter. I have multiple fields to search: I built a form, and I would like them to be able to choose form a set of...
by: jodstar | last post by:
Hi I am still very new at this but need help with a database problem. To make things simple, I have a database with a form (frmDataEntry) where users can input information (that mostly goes into...
by: NLR2008 | last post by:
Hi there, Can anybody help me and provide me with a SIMPLE solution to create a search form in Access 2003. I have created a database for Finance Payments and want to enable the user to...
by: rousseaud | last post by:
Hello, I need some help/advise about how to tackle an Access problem. Right now, it's kind of a big idea and I would really appreciate any input about how to do it properly. I essentially want...
Jerry Maiapu
by: Jerry Maiapu | last post by:
Dear all, I have a simple but very important database fundamental question on table relations with fixed values and its form design problem I am facing for easy data entry. I have about 3 tables...
by: abadaysheker2 | last post by:
Hi my Data Base consist of the following tables: Customers,Products, Suppliers,Orders,Orders_Details the relationships are as follow Customers-Orders ( one to Many relational field...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
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...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.