473,770 Members | 4,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Massive form/subform problem

I'm using Access as a front-end to a MySql database, through ODBC.

I have a form set up for entering information about projects and that
form has, among other things, a subform where you can select people
associated with the project, from another table.

When I enter a new record and assign people to a project everything is
fine. Then when I change the id of the record (project id) and save,
the subform goes blank and people are still assigned to the old
project id. There are also other subforms on the main form that go
blank as well, so this seems to be a general problem conerned with
linking the subforms correctly to the main form.

I did not create this originally, I am not too familiar with Access
and I couldn't find a similiar problem in this group. I desparately
need too solve this problem so if anyone has any thoughts on it, I
would be eternally grateful.

Dave
Nov 13 '05 #1
4 1386
"David Gunnarsson" <da****@hi.is > wrote in message
news:25******** *************** ***@posting.goo gle.com...

When I enter a new record and assign people to a project everything is
fine. Then when I change the id of the record (project id) and save,
the subform goes blank and people are still assigned to the old
project id.
The above sounds correct..right? You enter some people to a given project,
and save, and those people are thus (still) assigned to the project id? Is
not the above standard approach? Where else would the people be assed to?
There are also other subforms on the main form that go
blank as well, so this seems to be a general problem conerned with
linking the subforms correctly to the main form.


Hum, it sounds like the relations between the tables are not setup
correctly. Two things I would check:

1) Do the linked tables expose a timestamp field to ms-access (if the
ms-access forms are based on queries, then again, make sure a timestamp
field is exposed).

2) Are the link master, and link child fields of the same data time, and
are they setup correctly in the sub-form properties? (this setting is
critical, as it is how the relation between two tables is actually set. You
don't even have to setup a relation between the tables on the database side
(you should do this however!!!). Anyway, even after you build and setup the
relation between the tables, you still MUST set the master/child settings in
the sub-form. This is how the actual field used in the child table for the
relation is set. So, ask yourself, when you add a child record, how does it
know what parent record it belongs to? (answer: some value in the child
table is set to the key id of the parent record, and the link master/child
settings will do this for you). Of couse, this link master deal only works
for a sub-form. If you in fact launch a seperate form, then you have to use
code to setup the value for the field in the relaton.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl************* ****@msn.com
http://www.attcanada.net/~kallal.msn
Nov 13 '05 #2
Thank so much for the quick reply! However, I think items nr. 1 and 2
that you mentioned are ok - but then again I am not an Access guru, so
I'm not sure.

But the thing that I want to happen, when I change the project id, is
that the people assignments are updated to reflect this new id - is that
possible?

Personally I think this setup is kind of stupid, the project should have
auto incrementing id's and then this wouldn't be a problem. I may just
have to go ahead and change that in the end.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
Sounds like you need "cascading update". That is a feature of the database
engine, and I don't know whether MySQL provides it. That's the reseach you
need to do -- can you do it, and how, in MySQL.

Larry Linson
Microsoft Access MVP

"David Gunnarsson" <da****@hi.is > wrote in message
news:41******** **************@ news.newsgroups .ws...
Thank so much for the quick reply! However, I think items nr. 1 and 2
that you mentioned are ok - but then again I am not an Access guru, so
I'm not sure.

But the thing that I want to happen, when I change the project id, is
that the people assignments are updated to reflect this new id - is that
possible?

Personally I think this setup is kind of stupid, the project should have
auto incrementing id's and then this wouldn't be a problem. I may just
have to go ahead and change that in the end.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #4
It looks like I can, so now I just have to figure out how :) Thank you
very much for the tip and all your previous help, it was greatly
appreciated!

David

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #5

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

Similar topics

1
3058
by: Max Harvey | last post by:
Hi, I made up a nice little form which had its own sub form in it. I made a litle VB code so that when I pressed a button it would move form the form (frmConference) to the subform (frmBookingBookingBased), start a new record, and copy some values form the form into some fields in the subform, and then leave the cursor sitting (in focus) at the begining of the subform.
25
10265
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
4
7018
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 user enters the last qualifying field on the main form. In one case this works fine, the subform shows the data the user wants to update -- which means showing all the data put in previously (ie showing this via the requery and the continuous...
12
12959
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can we prevent this from happening? Thanks. ming
2
4292
by: David W. Fenton | last post by:
I think at various times we've all encountered this problem: A subform is on a main form. From the code of the main form we refer to some property of/control on the child form thus: Me!subForm.Form!txtTextBox and for some reason, in certain contexts, we get the error: Error 2455: You entered an expression that has an invalid reference
4
2088
by: Regnab | last post by:
I've got a form - "frmLookup" (with a subform) that works very happily on its own. The form has a list box, which when updated requeries the subform to display the appropriate results. The problem is that for the final user interface, I had planned to use a "frmDisplay" form which had a number of menu items and then depending on what the user selected, it would display the appropraite form in a subform beneath the menu items. I did this...
4
8850
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 which allows me to edit the record in the subform. What I want to happen is for subform with the new edits to be updated on the main form when I close the popup. I'm sure this is a very small bit of code in the the 'On close' event for the popup...
3
7701
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent form affects data in the subform. I've had this type of setup often, but I've run across a couple forms where this has caused an "enter parameter value" pop up for each reference to the parent control in the query when the main form is closed. ...
11
7177
by: mrowe | last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my mind I am wonder if this is causing my problem, but I don’t want to go through the work to convert to DAO unless I know it is truly in my best interest.) I am having problems getting a requery to show up consistently on a couple of forms. I have...
0
10237
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
10071
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
10017
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
9882
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
8905
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
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
5326
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...
0
5467
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.