473,790 Members | 2,514 Online
Bytes | Software Development & Data Engineering Community
+ 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 1761
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*******@yaho o.com> wrote in message
news:35******** *************** **@posting.goog le.com...
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
2415
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 works without any problem in Acc97, 2000 and 2002, but now in Access 2003 there seem to be a problem with this. A user is working with my app, and he uses an Access 2002 MDE in an Access 2003 environment.
0
1923
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 mainform (to show updated values), causes the updated subform(s) to automatically scroll up to one blank line if a new record was entered, or to the line that was edited. All of the prior subform records are not viewable or accessible until exiting...
0
2100
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 going to the menu and selecting Records and then Refresh? or To explain, based on a three table system where cars participate in rallies,
6
1899
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
3612
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 for each customer and is autofilled on the subform. Subform contains field called TicketID (which there could be multiple instances of and is not referenced on the mainform at all). I want to be able to type in a TicketID and have the mainform...
4
2531
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 is that i need to make a button for users which updates this field with data from another tabel on demand. I have tried to make some code myself Do While Not .NewRecord .Lagbeholdning.SetFocus .Lagbeholdning = DLookup("lagerbeholdning", "tbl...
7
3429
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 mainform. My subform in the detail section goes blank (this is what I want) but my subform in the footer section appears to have the data from the previous record displayed. When you click on the subform the data dissapears and displays blank. If...
2
1545
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 the holder information in mainform, he can see his personal info in mainform and license info in subform. What I want is: When the user click the command button "Add license info", the user should be able to write into the grid shown in the...
64
6819
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 that runs under sourceObject on the mainform unbound frame. like, when i a company name on mainform combo box then the subform shows only records for that company. eg like how it works when filtering a query.. regards. lovelydan P.S. subforms...
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10413
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10145
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5422
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3707
muto222
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.