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
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
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
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
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.
Right,
I have tried that and I can only get half way along the record and then it stops me entering the information.
Nikki
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
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;
NeoPa 32,568
Recognized Expert Moderator MVP
Try changing the FROM clause to this. - FROM (((((Venues INNER JOIN Events
-
ON Venues.VenueID = Events.VenueID)
-
INNER JOIN Tutors
-
ON Events.TutorID = Tutors.TutorID)
-
INNER JOIN Courses
-
ON Events.CourseID = Courses.CourseID)
-
INNER JOIN Bookings
-
ON Events.EventID = Bookings.EventID)
-
INNER JOIN Attendees
-
ON Bookings.AttendeeID = Attendees.AttendeeID)
-
INNER JOIN Contacts
-
ON Attendees.CompanyID = Contacts.ContactID;
MMcCarthy 14,534
Recognized Expert Moderator MVP
Try changing the FROM clause to this. - FROM (((((Venues INNER JOIN Events
-
ON Venues.VenueID = Events.VenueID)
-
INNER JOIN Tutors
-
ON Events.TutorID = Tutors.TutorID)
-
INNER JOIN Courses
-
ON Events.CourseID = Courses.CourseID)
-
INNER JOIN Bookings
-
ON Events.EventID = Bookings.EventID)
-
INNER JOIN Attendees
-
ON Bookings.AttendeeID = Attendees.AttendeeID)
-
INNER JOIN Contacts
-
ON Attendees.CompanyID = Contacts.ContactID;
To make it updatable, it may be required to change all the INNER JOINS to LEFT JOINS.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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
|
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...
|
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
|
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.
| |
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
|
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...
|
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...
|
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....
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 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...
| |