Advertisement

02.06.2007 at 01:21PM PST, ID: 22152045
[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!

8.2

How to select a value from a comboBox in a subform using VBA

Asked by weissenb in Microsoft Access Database

Tags: , , , ,

Hello,

I have a form for patient idendity and a subform with a combobox made to select treatments from a list of treatments.
When I create a new patient, I open the form and want that the combobox selects automatically the treatment "NoTreatment" which as a Ref_Traitement of 39...(ocode for none)..

I use the following code

Private Sub Form_Open(Cancel As Integer)
Dim CodePatient As Long
Dim varCount As Variant

varCount = DCount("[Réf_Patient]", "_rqfiltreentreeformulaire", Me!Réf_Patient)

If varCount = 0 Then

    CodePatient = Forms![Gestion des patients]!Réf_Patient
    DoCmd.GoToRecord , , acNewRec
    Me.Réf_Patient = CodePatient
    Me.Requery
   Me![_Associations Ther Sous-formulaire]!Réf_Traitement = 39

                 
Else
End If
end sub


_______________________

But this code allways says that he couldn't find the field addressed by the code..

I tried a lot of things.. changing dots to !  and reverse. Nothing..

When I go directly to the combobox and asking 39 to be the default value, this does work rperly. The selection is just not seen by the record of the parent form.
SubForm and parentform are linked by patient reference.
And the subform is linked to a table (treatment_table)..


I would greatly appreciate some help

JacquesStart Free Trial
[+][-]02.06.2007 at 02:02PM PST, ID: 18480171

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.

 
[+][-]02.06.2007 at 02:27PM PST, ID: 18480345

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.

 
[+][-]02.06.2007 at 02:29PM PST, ID: 18480359

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.

 
[+][-]02.06.2007 at 03:59PM PST, ID: 18481185

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]02.06.2007 at 06:03PM PST, ID: 18481899

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.

 
[+][-]02.06.2007 at 06:15PM PST, ID: 18481960

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.

 
[+][-]02.06.2007 at 06:19PM PST, ID: 18481977

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.

 
[+][-]02.07.2007 at 01:53AM PST, ID: 18483603

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]02.07.2007 at 12:31PM PST, ID: 18488347

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]02.07.2007 at 02:45PM PST, ID: 18489456

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.

 
[+][-]02.07.2007 at 02:58PM PST, ID: 18489556

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]02.07.2007 at 03:06PM PST, ID: 18489607

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: combobox, how, linked, value, vba
Sign Up Now!
Solution Provided By: harfang
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20081112-EE-VQP-42