Hello all,
I've attached a database here that we're using to register people for a series of classes, for a course that we're offering for pre-baptismal certification.
I'm wondering if there is a way that we could use one selection from the drop down list to auto populate the entire course dates in the sub form. That way, we would only select one item instead of having to select every class individually for every person that registers.
I hope that's clear enough please take a look at the contacts form to get a better idea of what I'm trying to do.
Thanks for your help in advance!
Atlante
P.S.
I'm using the Access2003
5 2672 ADezii 8,834
Recognized Expert Expert @atlanteavila
The only Drop-Down I see is the Date Field in the Registrations Sub-Form. Is this what you are referring to?
Yes, that's the one I would like to use. Thank you!
ADezii 8,834
Recognized Expert Expert @atlanteavila
Are you requesting that if the User selects ' ANY' Date from the Date Drop-Down that it (Sub-Form) should be populated with ' ALL' available Dates? If my assertion is correct, the only thing that makes any kind of sense to me is that the Sub-Form is automatically populated after a Record is added to the Main Form. Is this logic, assuming the previous is correct, acceptable to you? In my thinking, you can run into a lot of problems, and a lot of coding any other way.
Well sort of. I'm thinking I may need to add another drop down field and once I select something like full course from that field, the after update comes in and automatically adds all of the classes to the sub-form. Sounds a little far fetched but we have over 200 people that are planning to attend this course and it's just driving me crazy having to select every class for these registrants. Any help would be great or if you can think of a different work around I wouldn't mind going with anything at this point. It's just so time consuming!
Thanks for your help!
ADezii 8,834
Recognized Expert Expert @atlanteavila
When I get a chance, I'll create some Generic Code that will automatically populate the Sub-Form with all the available Dates. How to implement it, I'll leave up to you. Actually, I made this a Rush Job before I went to bed. The following Code should work rather nicely for you: - Dim intNumOfRelatedRecords As Integer
-
Dim MyDB As DAO.database
-
Dim rstClasses As DAO.Recordset
-
-
'Are there already Records in the Sub-Form based on the Current [CID]?
-
intNumOfRelatedRecords = DCount("*", "[Registrations]", "[CID] = " & Me![CID])
-
-
If intNumOfRelatedRecords > 0 Then Exit Sub 'Related Records exist
-
-
Set MyDB = CurrentDb()
-
Set rstClasses = MyDB.OpenRecordset("Classes", dbOpenForwardOnly)
-
-
With rstClasses
-
Do While Not .EOF
-
CurrentDb.Execute "Insert Into [Registrations] ([CID], [Date]) Values (" & _
-
Me![CID] & ", '" & ![ClassID] & "');", dbFailOnError
-
.MoveNext
-
Loop
-
End With
-
-
Forms![Contacts]![Registrations Subform].Form.Requery
-
-
rstClasses.Close
-
Set rstClasses = Nothing
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Therese A. Sorna |
last post by:
Hello all...
I am using Access 2002, and am trying to find a way for a user to be
able to select multiple entries from a drop-down list. I am hoping
that given a list as such:
a
b
c
d
|
by: Abbey Krystowiak |
last post by:
Does anyone know if I can have a field in a row where I can add two
lines of info without adding a whole new line?
and then there would be a drop down menu?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|
by: Aaron Prohaska |
last post by:
I'm having the problem with this drop down list on postback. For some
reason both the ListItems get selected when I change the selected item.
Using the code below I'm building the drop down list in the overriden
CreateChildControls method and setting the selected item. Then when I
change the item in the drop down list the list is rebuilt from
viewstate, but the initial item is still selected causing the error
below.
I also have a number...
|
by: macyp |
last post by:
I have to pass values from one aspx page to another. The controls I
have in the first page are:
a textbox, 3 drop down lists, and 2 check boxes, and a submit button.
It is a search page, and the users need not enter values in all the
controls. they can leave the textbox blank, and select values from one
drop down, or any other combinations.
I am trying to pass values with the help of session variables. But I
have multiple if else...
|
by: Ed Dror |
last post by:
Hi there
ASP.NET 2.0 VB & SQL Express
Lest take Northwind Categories Products as example
I create a table that hold these two together
and I create a stored procedure like
select ProductID, ProductName, CategoryID, from tblCategoryProducts
Where (CategoryID = @CategoryID)
| |
by: Jeff Gardner |
last post by:
Greetings:
I have a table with 3 pieces of data that I would like to use to
dynamically populate 3 drop downs using javascript. The fields are
state, orgname, office. If it's not already obvious, I'd like orgname
drop down to change when a state is selected and I would like office
drop down to change when an orgname is selected. I can do this with
multiple tables but am having difficulty getting it to work when the
data is in the...
|
by: rameshbhojan |
last post by:
Hi All,
Please let me know if there is way in which i we can make multiple selections from a drop down list.
The requirement is as follows:
I have a drop down list, whose entries are to be populated from a table in the database. The user should be able to select multiple items from the drop down list(Maximum 3), and on pressing the submit button, a single column in a row, in the table should be populated with all the selected values....
|
by: Igor |
last post by:
Hello
I have the following problem. I have three drop down lists on my page. They
are filled with data from a database. Initially only the first one is
enabled. The next one is enebled when user selects an item from the first
one -- it is then filled with data specific to the selection in the drop
down list above. The same with the third one. For each drop down list the
first item is always "--select an item--" (as described here:...
|
by: Pufferfish |
last post by:
Hi everyone,
I want to be able to select multiple items from a drop down list. I have set up a second table with a list of records under one field called "Courses". On my main database table I have a field called "Pending Courses". I have used the Lookup wizard for this field so that a drop down list appears that's linked to the second table and so has a list of courses as the available options. Currently, however, only one course can be...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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: 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...
|
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...
| |