Advertisement

12.17.2006 at 04:22AM PST, ID: 22095860
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2

Getting a stored value from a subform

Asked by maraas in Microsoft Access Database

Tags: , , ,

Hei,

I have a custom designed calendar (main form: CalendarSchedule) which is made up of 37 (to account for changes in what weekday the first day of the month starts...) small subforms (sub forms: CalendarSchedule_dates). The subforms are named SF1, SF2, ..(up to SF37) as they are copied into the main form.

The calendar is used for keeping track of a number of training courses and which days they are taught. A routine sweeps through the calendar, placing information about courses for each day into the corresponding subforms. The original subform has eight fields - four txtCourseDescription (-4), which may contain text related to a specific course (i.e. my calendar handles up to four different courses pr day). In addition, I have four corresponding fields (not visible) to store the courseID. The courseID is needed as reference, in order to be able to open a separate form with all relevant information about that specific course (opens on double click).

Being in the main form, my main struggle is to code the part that retrieves the courseID from a given subform (e.g. "SF11", from one of the four possible courses, courseID1 (-4). This must be coded as an event procedure (dblClick) in the original subform ("CalendarSchedule_dates"), on each of the four txtCourseDescription1 (-4) fields. Note that the subform may contain information about up to four different courses on the same day.

My own logical approach includes the following:

' first determine which of the subforms is double clicked on
Dim SFnum as Integer
SFnum =    ... don't know how to do this...

' retrieve the courseID value from the subform found above
Dim cID as String
cID = Me.Controls("SF" & SFnum).Form.courseID1    ....  THIS IS THE PART WHERE I NEED THE MOST HELP..
       .. I have a feeling it should contain stuff like "Me.Parent...." or something

' use the cID to open the new form, containing data about the chosen course
stDocName = "frmCourseInformation"
StLinkCriteria = "[courseID]=" & "'" & cID & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria      ... (this part should be ok when I get that far...)


Help and suggestions is deeply appreciated :-)



Start Free Trial
[+][-]12.17.2006 at 08:11AM PST, ID: 18154793

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: from, getting, subform, value
Sign Up Now!
Solution Provided By: dannywareham
Participating Experts: 2
Solution Grade: B
 
 
[+][-]12.17.2006 at 12:14PM PST, ID: 18155401

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32