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

Home Posts Topics Members FAQ

Update mainform from subform

Hi All,

I want to update a column in my Users table through a subform.
I have made a mainform where you can choose a Department (from
Department table), then a subform pops-up showing the users in that
Department.
Now I want to make 2 buttons on this subform to pop-up new (sub)forms
to add or delete a user to/from this Department, but this DepartmentID
must be updated in the User table, how can I fix this and how do I
refresh the first subform after adding/deleting a user to/from this
Department.

Thx in advance for your help.
Nov 13 '05 #1
1 1747
The easiest way would probably be to run an update or delete query when you
click the button. Which you run will depend on whether you want to delete
the user or move them to another department. After you do this, do
Me.Requery in the button's code to force the subform to requery its record
source.

--
Wayne Morgan
MS Access MVP
"Greatmaze" <gr*******@yahoo.com> wrote in message
news:35*************************@posting.google.co m...
Hi All,

I want to update a column in my Users table through a subform.
I have made a mainform where you can choose a Department (from
Department table), then a subform pops-up showing the users in that
Department.
Now I want to make 2 buttons on this subform to pop-up new (sub)forms
to add or delete a user to/from this Department, but this DepartmentID
must be updated in the User table, how can I fix this and how do I
refresh the first subform after adding/deleting a user to/from this
Department.

Thx in advance for your help.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sabine Oebbecke | last post by:
Hi Experts! I have several forms and reports where controls get their values with 'Forms!MainForm!Control' or 'Forms!MainForm!Subform!Control' resp 'Forms!MainForm!Subform.Form!Control' which...
0
by: Dalan | last post by:
I'm sure there is a workaround for this, but haven't found it yet. I have a mainform with two subforms and after one or both of the subforms are updated, then clicking the Refresh button on the...
0
by: P Mitchell | last post by:
Hello I would like someone to be able to help with the updating of data in a lookup list in a subform. In short, is their a VB instruction that is the equivalent of performing the action of...
6
by: Igor | last post by:
Hi, I have tab control on one of which pages is subform. When I change data on one of pages and navigate to another, update in database is happened. Is there any way to avoid that? Thanks
18
by: Robert Jacobs | last post by:
Please advise... I currently have a Mainform (Customers) and a Subform (Service Requests) with a one to many relationship (one customer, many service requests) with a CustomerID that is unique...
4
by: MrDeej | last post by:
Hello guys! I have a masterform "kg" and a subform "kg varelinjer" (order and order details in english) In the subform i have a field named "lagerbeholdning" (storage quantity) and my problem...
7
by: FNA access | last post by:
I have a mainform that has a subform in the detail section and a subform in the footer section.(Both subforms are in datasheet view) When I click the navigation button to create a new record on the...
2
jinalpatel
by: jinalpatel | last post by:
I have a mainform which contains "Holder Information (name,address,dob etc) and within this mainform a subform called "LicenseInformation" (licensetype,purchasedate,amount etc) When user search...
64
by: lovelydan | last post by:
hi all i need someone to help me with a code that will enable me filter records in a subform form through a combo box attached to a mainform-that has a main menu that controls all the sub form...
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.