Hi All,
I have a main form and subform the subform needs to get a value from the main form it is similar to the Northwinds invoice database, It updates the first product in the subform but any additional products that is added will not update.I am using the below to update the subform
Me.[Shipping_Orders_Detail_subform]![txtContactIDSubform].Value = Me.cboShipperName.Column(10)
is there a way I could modify the code above to get the subform to update as new products are added to the shipping order. I have tried using relationships to get it to update but does not work, so came up with this idea to use OnChange to update the records. so that when you select a contact it would sync the subform products in the subform. Any help or suggestions would be most appreciated. - Me.txtShipperAddress.Value = Me.cboShipperName.Column(2)
-
Me.txtShipperCity.Value = Me.cboShipperName.Column(3)
-
Me.txtShipperState.Value = Me.cboShipperName.Column(4)
-
Me.txtShipperPostalCode.Value = Me.cboShipperName.Column(5)
-
Me.txtShipperWorkPhone.Value = Me.cboShipperName.Column(6)
-
Me.txtShipperFirstName.Value = Me.cboShipperName.Column(7)
-
Me.txtShipperLastName.Value = Me.cboShipperName.Column(8)
-
Me.txtShipperPaymentTerms.Value = Me.cboShipperName.Column(9)
-
Me.txtContactID.Value = Me.cboShipperName.Column(10)
-
Me.[Shipping_Orders_Detail_subform]![txtContactIDSubform].Value = Me.cboShipperName.Column(10)
3 1067 twinnyfo 3,653
Recognized Expert Moderator Specialist
thearn634,
There should be no need to set up your forms this way. If you have your tables properly related and your forms properly designed, You shouldn't need to populate your subform in any way.
My initial guess is that your tables are not constructed properly, which is why youa re duplicating data by sending that data between forms.
We would need to know more about your table structure and design before we can give you better advice on this one.
Thanks!
Thank you twinnyfo,
I am a novice with access I used a template database and made some changes to it to fit my needs due to a time crunch, one day I will redo it from scratch, but for now I would just like to have the one field update each record for the shipper in the subform, (the last line of the code), everything else seems to work Ok or at least it will suffice for now, until I can get it rebuilt. What information would you need, I have attached the database for your review.
<attachment removed>
twinnyfo 3,653
Recognized Expert Moderator Specialist
Please know that we typically do not download users' DB's. Some of this is because many of our users access Bytes from work and they can't access them in the first place. The second is there is typicaly not a reason for us to download an entire database to troubleshoot one problem. Sometimes, there may be a need for us to do that, but we will explicitly request that database at that time. Third, many times databases have proprietary or personal information (I haven't checked yours), and so it would be inappropriate to post those files on line. Finally, (and this applies mostly to novices, but even to experts) many times, us opening a strange database will not help us at all--not until we know what's going on and why you have created what you have created. We can spend hours tracing through your DB trying to figure out where to start--that is not a wise use of our time. I've removed your DB for now. If we really need it, we will ask for it.
Back to the issue at hand, it would be helpful for us to know more about what you are trying to do.
Much about your posted code seems very strange. Why do you have a combo box with 11 columns? Why are you setting the values of all your controls from a combo box, rather than filtering the form on a certain record? If you have a subform that is in any way related to this record, why are you manually adding data to that form, rather than proerly structuring and relating those two tables/forms to each other?
I know you say you are a novice, and that's OK. But we are trying to help you design a DB properly, rather than just get a broken application working (but just barely).
Knowing more about your tables and knowing more about what you are trying to do will help us help you.
Thanks.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: A Clark |
last post by:
I have a subform that displays a datasheet. There are a couple of
different queries that can be displayed in the datasheet. The queries
are available in a combo box on the main form. The problem...
|
by: Lyn |
last post by:
Hi,
I am working on a genealogy form. The only table (so far) lists everybody
in the family, one record per person. Each record has an autonum ID.
The parent form (frmMainForm) displays the...
|
by: Jason |
last post by:
I am creating a form that has a subform. The main form is unbound
with a combo box, list box and a textbox. I need to get the subform
(a form that is bound to a query) to automatically update...
|
by: Laura |
last post by:
Here's the situation:
I'm trying to use an update query to copy data from one row to another.
Here is the situation:
I have 5 companies that are linked to each other. I need to show all 5...
|
by: bcreighton |
last post by:
I have created a bound subform on an unbound masterform linked together
with a common field (A store's identification number) using an unbound
combobox on the masterform and an invisible field on...
| |
by: rdemyan via AccessMonster.com |
last post by:
My App has 10 or so tables that we provide that contains proprietary data.
This data will need to be updated once or twice a year.
I would like some comments, suggestions on my proposed strategy...
|
by: Kurt |
last post by:
I have an unbound main form with an unbound subform.
frmProjects
fsubProjectList
Using combo boxes, the user can select several search criteria on
frmProjects and then click a command button....
|
by: Macbane |
last post by:
Hi,
I have a 'main' form called frmIssues which has a subform control
(named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs.
A control button on the main form opens a pop-up form...
|
by: Dave |
last post by:
I want to put the information that the user selects in my combo boxes
into a subform that lies on the same form as the combo boxes.
Thanks for your help already,
Dave
|
by: Gordon Padwick |
last post by:
A form contains controls, one or more of which can be other forms. A form that contains another form is known as a main form. A form contained by a main form is known as a subform. A subform itself...
|
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: 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: 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...
|
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...
|
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: 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...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |