473,503 Members | 12,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SubForm not updating

4 New Member
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.


Expand|Select|Wrap|Line Numbers
  1. Me.txtShipperAddress.Value = Me.cboShipperName.Column(2)
  2. Me.txtShipperCity.Value = Me.cboShipperName.Column(3)
  3. Me.txtShipperState.Value = Me.cboShipperName.Column(4)
  4. Me.txtShipperPostalCode.Value = Me.cboShipperName.Column(5)
  5. Me.txtShipperWorkPhone.Value = Me.cboShipperName.Column(6)
  6. Me.txtShipperFirstName.Value = Me.cboShipperName.Column(7)
  7. Me.txtShipperLastName.Value = Me.cboShipperName.Column(8)
  8. Me.txtShipperPaymentTerms.Value = Me.cboShipperName.Column(9)
  9. Me.txtContactID.Value = Me.cboShipperName.Column(10)
  10. Me.[Shipping_Orders_Detail_subform]![txtContactIDSubform].Value = Me.cboShipperName.Column(10)
Aug 7 '19 #1
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!
Aug 7 '19 #2
thearn634
4 New Member
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>
Aug 8 '19 #3
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.
Aug 8 '19 #4

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

Similar topics

3
13382
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...
25
10165
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...
2
1282
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...
4
2266
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...
1
3199
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...
1
2695
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...
14
11441
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....
4
8803
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...
6
3667
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
0
30334
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...
0
7212
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
7364
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...
1
7017
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
7470
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
5604
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
5026
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
3186
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...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
405
bsmnconsultancy
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...

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.