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

Trying to Change a Variable in Main Form from Subform

4
From an OnChange in VBA in a SUB form I am trying to change a value in the main form.

Basically this is to let me know at a quick glance if any of the data has changed on the sub form.

Any Ideas?
Jun 30 '10 #1

✓ answered by MikeTheBike

@Talnus
Hi

Try this in the on current even

Me.Parent.txtControlName = "Value to be set"

Any question/problems, please ask.


MTB

3 2625
MikeTheBike
639 Expert 512MB
@Talnus
Hi

Try this in the on current even

Me.Parent.txtControlName = "Value to be set"

Any question/problems, please ask.


MTB
Jul 1 '10 #2
NeoPa
32,556 Expert Mod 16PB
Your code on the sub-form can refer to the main form as Me.Parent. From there only you know which controls are available and which should be updated.

Welcome to Bytes!
Jul 1 '10 #3
Talnus
4
Awsome this was to simple, it worked perfectly Thank you
Jul 1 '10 #4

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

Similar topics

3
by: Tony | last post by:
Hi, How do you change the main form in visual basic .net 2003? I have a form1 as the startup form. Based on a user response as to which mode to run the program in, i would like to transfer...
1
by: Bill Strass | last post by:
Problem: Access main form/subform as front end to SQL Server backend. Add/edit via subforms work fine. Not so with main form. Set up a master-detail form-subform using two views linked from SQL...
0
by: Deano | last post by:
I have a main/subform arrangement which works well. The main form's parent records are about employees. The subform calculates their salary. I have now decided that the user can enter some...
4
by: Dave Boyd | last post by:
Hi, I have two very similar forms each with a subform. The main form gets a few fields from the user and passes this back to a query that the subform is bound to. The requery is done when the...
3
by: Arda Han | last post by:
Hi friends I have 3 form in my solution.Their names : Loginform Mainform SettingForm How can I set my Application Main Form to Mainform?
2
by: Narvs | last post by:
I have a main form with information on people hired and on this form I have a button that you click to term an employee which opens a new dialog window to enter a term date. Now it doesn't remove...
3
by: Steve | last post by:
Is there a way to put a main form/subform in a continuous form so I can scroll through all the records in the main form? Thanks!
1
by: troy_lee | last post by:
I have a table (Table A). It has one field, a PK. It is in a 1:M with another table (Table B). I am having trouble with a form/subform setup to view the 1:M records. On the parent form, there is...
2
by: adigga1 | last post by:
Hello, I am running into an issue whereby, I'm attempting to create a form using a combo box selection (CPTcode). Once I make this selection the Charge price should auto populate accordingly. I'm...
2
by: phill86 | last post by:
Hi, I want to be able to assign a variable with a subform name the following code allows me to get the main form name but I also need the subform within the form Dim strFormName As String...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
jinu1996
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...
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,...

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.