473,467 Members | 1,981 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I add values to a datasheet subform with a command button on the parent form?

34 New Member
I have a button on a parent form. OnClick, I would like the subform datasheet to fill in a set of 11 records into one column (ValveID) with specific values. Consider it a sample set that is specific to each record of the parent form.
Example:
Record 1... ValveID = "Valve A"
Record 2... ValveID = "Valve B"
Record 3... ValveID = "Valve C"
Jan 28 '19 #1
1 1447
Pookaroo85
34 New Member
FIGURED IT OUT! :)

Create a query that gives you the information you want to transfer.
Change the select query to an append query.
Create a button on your form and write the following On Click event:

Private Sub ButtonName_Click()
DoCmd.Save
CurrentDb.Execute "QueryName", dbFailOnError
Form.Refresh
MsgBox ("You did it!")
End Sub
Jan 31 '19 #2

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

Similar topics

4
by: Gerry Abbott | last post by:
Hi all, A subForm control, txtTotalSubForm contains a total from one of the fields on this subForm . The mainForm contains a combo, myCombo which filters, and updates the details on the subForm. I...
3
emandel
by: emandel | last post by:
I am an armature access programmer trying my best to design my own database so your patience and detailed instructions is much appreciated. Here is my question: How do I get a command button (on...
2
by: buddyr | last post by:
Hello, I have a cmd button on form to search for serial number. I notice when I search for record-that if I don't start at the beginning of records I might not find the record. example: if I am...
6
by: solom190 | last post by:
Okay this is the situation I have two forms and they have a 1:M relationship. I don't have enough space screen-wise to do a traditional "drag form to form" to create a subform so what I did was...
1
Jerry Maiapu
by: Jerry Maiapu | last post by:
Hi Please help. How can I delete i single record in a datsheet subform from main form using a delete button on the parent form.? i will be more grateful for your help... jm
7
by: Bre035 | last post by:
Created a database that I want to be maintained and updated by the Department designated Admins. I have an user table that set specific individuals access to Admin and created admin form and...
2
by: Parmenides | last post by:
I get the "this record has been changed by another user since you started editing it" message when I first make an edit in a subform then click on anything in the parent area. It won't give me the...
0
by: Paul Wilson | last post by:
Access 2003 Sp2 – Pretty new to Access so please bear with me! I have created a simple database which has 4 tables with matching column names but info from different systems. I have merged some...
19
by: aswgawlag | last post by:
Hello everyone. I am new to Microsoft Access and have been creating a database to store records, add new records, update records, delete records, search records, create reports from records, etc....
4
by: Sandy1992 | last post by:
Dear friends, I am using A2010. I am trying to export my filtered datasheet to excel. Tried TransferSpreadsheet() but nothing helped. Lastly I tried below code but excel only displays 1 column....
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
marktang
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,...
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
Oralloy
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,...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.