473,653 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I Can't Update Info in my subforms

7 New Member
Hi, I'm new to the forum and I am currently designing a database that my colleagues can use to book people onto our courses.

I have a form set up with two subforms. The main form is one that has the course details, I then have a subform with the individual dates throughout the year. I also have a further subform that shows who has booked onto each date when I am on the course and date applicable.

Unfortunately I do not seem to be able to add new records to either of the subforms I can only change details of current records. I can however add new records to the main form.

Where am I going wrong??

I would appreciate any help you can give me.

Nikki
Nov 23 '06 #1
17 2878
MMcCarthy
14,534 Recognized Expert Moderator MVP
There are a number of possibilities Nikki.

Firstly are your subforms based on queries. If so try running those queries outside the forms. If you cannot add a record at the end then the query is not updateable.

If this is the case post the sql for your queries and we'll take a look at them.

If not, let me know and we'll try something else.

Mary


Hi, I'm new to the forum and I am currently designing a database that my colleagues can use to book people onto our courses.

I have a form set up with two subforms. The main form is one that has the course details, I then have a subform with the individual dates throughout the year. I also have a further subform that shows who has booked onto each date when I am on the course and date applicable.

Unfortunately I do not seem to be able to add new records to either of the subforms I can only change details of current records. I can however add new records to the main form.

Where am I going wrong??

I would appreciate any help you can give me.

Nikki
Nov 23 '06 #2
NikkiR
7 New Member
The subforms are based on a query. I tried to update the form and the first part of the query could be updated but then when I got to what would be the first subform again it would not let me update.

Does that help with identifying the problem?

There are a number of possibilities Nikki.

Firstly are your subforms based on queries. If so try running those queries outside the forms. If you cannot add a record at the end then the query is not updateable.

If this is the case post the sql for your queries and we'll take a look at them.

If not, let me know and we'll try something else.

Mary
Nov 24 '06 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
The subforms are based on a query. I tried to update the form and the first part of the query could be updated but then when I got to what would be the first subform again it would not let me update.

Does that help with identifying the problem?
Not really Nikki.

For the moment I want to forget about the form and see if there is a problem just with the query. The only way to do that is to run the query in the query window and see if you can add a complete record to the end of it and save it. You can always delete the record later.

What I'm worried about is that the problem is with the query and not the subform.

Mary
Nov 25 '06 #4
NeoPa
32,568 Recognized Expert Moderator MVP
Make sure you do this with the query used for the subform though (the one with the problem) and not the query for the main form if that doesn't have a problem.
Nov 25 '06 #5
NikkiR
7 New Member
Right,

I have tried that and I can only get half way along the record and then it stops me entering the information.

Nikki
Nov 25 '06 #6
MMcCarthy
14,534 Recognized Expert Moderator MVP
Right,

I have tried that and I can only get half way along the record and then it stops me entering the information.

Nikki
Ok your query is not updateable. At a guess I would say it has to do with the relationships between your tables and the joins. If you would like to post the sql of the query we will have a look at it.

If you're not sure how to get this then in query design view change the view to sql and copy and paste the code here.

Mary
Nov 25 '06 #7
NikkiR
7 New Member
As requested:

SELECT Courses.CourseN ame, Courses.Duratio n, Courses.Cost, Courses.MaxNo, Courses.MinNo, Events.Date, Events.StartTim e, Events.EndTime, Tutors.TutorNam e, Venues.VenueNam e, Attendees.Foren ame, Attendees.Surna me, Contacts.[Company Name]
FROM (Venues INNER JOIN (Tutors INNER JOIN (Courses INNER JOIN Events ON Courses.CourseI D = Events.CourseID ) ON Tutors.TutorID = Events.TutorID) ON Venues.VenueID = Events.VenueID) INNER JOIN ((Contacts INNER JOIN Attendees ON Contacts.Compan yID = Attendees.Conta ctID) INNER JOIN Bookings ON Attendees.Atten deeID = Bookings.Attend eeID) ON Events.EventID = Bookings.EventI D;
Nov 26 '06 #8
NeoPa
32,568 Recognized Expert Moderator MVP
Try changing the FROM clause to this.
Expand|Select|Wrap|Line Numbers
  1. FROM (((((Venues INNER JOIN Events
  2.     ON Venues.VenueID = Events.VenueID) 
  3.     INNER JOIN Tutors 
  4.     ON Events.TutorID = Tutors.TutorID) 
  5.     INNER JOIN Courses 
  6.     ON Events.CourseID = Courses.CourseID) 
  7.     INNER JOIN Bookings 
  8.     ON Events.EventID = Bookings.EventID) 
  9.     INNER JOIN Attendees 
  10.     ON Bookings.AttendeeID = Attendees.AttendeeID) 
  11.     INNER JOIN Contacts 
  12.     ON Attendees.CompanyID = Contacts.ContactID;
Nov 26 '06 #9
MMcCarthy
14,534 Recognized Expert Moderator MVP
Try changing the FROM clause to this.
Expand|Select|Wrap|Line Numbers
  1. FROM (((((Venues INNER JOIN Events
  2. ON Venues.VenueID = Events.VenueID) 
  3. INNER JOIN Tutors 
  4. ON Events.TutorID = Tutors.TutorID) 
  5. INNER JOIN Courses 
  6. ON Events.CourseID = Courses.CourseID) 
  7. INNER JOIN Bookings 
  8. ON Events.EventID = Bookings.EventID) 
  9. INNER JOIN Attendees 
  10. ON Bookings.AttendeeID = Attendees.AttendeeID) 
  11. INNER JOIN Contacts 
  12. ON Attendees.CompanyID = Contacts.ContactID;
To make it updatable, it may be required to change all the INNER JOINS to LEFT JOINS.
Nov 27 '06 #10

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

Similar topics

0
2273
by: JJMM | last post by:
Hi, I have a form with a large number of subforms inside it (around 20 subforms), There is the possibility of filtering the data using a pop-up form that create/change a query (all the subforms are linked to that query), Once that I create/change the query, Is there any easy way to update all the 20 subforms on the fly??. Normally I use to change the recordsource in each subform to show the changes, but since there are 20 subforms...
1
7466
by: JJMM | last post by:
Hi, I have a form (form1) with a large number of subforms inside it (around 20 subforms), There is the possibility of filtering the data using a pop-up form that create/change a query (all the subforms are linked to that query), Once that I create/change the query (using the pop-up form), Is there any easy way to update all the 20 subforms inside form1?. Normally I use to change the recordsource in each subform to show the
3
3878
by: dixie | last post by:
I have a form full of subforms which bring summary information onto the form from about 12 different tables. I am trying to get all of that summary information (mainly numbers) into 1 large table that represents the final results for the year. The table into which I wish to save it has 10 records, the past 10 years results. The problem is that I select the calendar year from an unbound combo box and it runs a filter that restricts the...
2
4667
by: dskillingstad | last post by:
I would really appreciate someone's help on this, or at least point me in the right direction.... I'm working on a permit database that contains 12 tables, and rather than list all of the tables, I'll just list a few, as the links are the same for all tables. These tables are: tblPermitMain tblApplicant tblContractor tblEngineer
1
2995
by: flamethrower01 | last post by:
Hi, I have a form (with 4 subforms) which is filtered by 3 combo boxes. Upon loading the form, the form populates fine. After the first combo box, the form works fine. After the second one , all 4 forms are correctly populated yet 2 of the 4 subforms' records cannot be modified.
3
3806
by: TD | last post by:
I need help understanding a better way to do this. I have an unbound form named frmParts that has two subforms neither of which is bound to frmParts. One subform is named frmSubParts and it's record source is tblParts. The other subform is named frmSubAssemblies and it's record source is tblAssemblies. tblParts RecID AutoNumber Primary Key VendorPartNumber Text ProtecPartNumber Text
6
3529
by: Chris Larmer | last post by:
I have two subforms in my main form. In the main form I want the user to select a customer, class, and date range. The 2 subforms are similar. One is the history records in the recent past and the other is future records. The user has to input a passenger forecast for the customer for the selected class for each record in the date range. The subforms are populated by a query which is altered according to their selection. I wish to...
1
3755
by: banging | last post by:
Hi there, I have a question regarding locking of tables so that when two or more people try to write or update the mysql tables, it locks up. Basically I only want one person to write to the file, but many are able to read the files (or tables entities). I am not sure if I need to lock the tables in my Java code or do I lock the tables within the MySQL syntax. I'm just a little confused on the matter. This java code is a working...
3
1635
by: EINSTEIN1221 | last post by:
I have created a program for our company in Access 2003 that allows users to track inventory, pricing and create purchase orders. I have also created a similar table for tickets. My purchase order table has a primary key assigned that we use for a Purchase order#. The Customer info is contained in this form. The actual product info is contained in a subform which is tied to the form by the Purchase order #. I have structured the Tickets similar....
0
8283
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
8811
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...
1
8470
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
7302
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
6160
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
5620
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
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1591
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.