Page 1 of 3 123 LastLast
Results 1 to 15 of 35
  1. #1
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pricing matrix (2k)

    I need to include (for receipting purposes) a pricing matrix in my database. There are 27 different price possibilities for my conference. They are all dependent on when the student registers, if they are a member or not, retired or not, etc. When I prepare the receipt of registration, I want to be able to make a combination choice and have it priced accordingly. I need some advice on how best to set this up. This one seems pretty tricky!

    Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: pricing matrix (2k)

    If you haven't done so yet, you will need to add fields to the appropriate table (probably the students table) to store information such as membership etc.: Yes/No fields for yes/no choices, numeric fields for choices with multiple options, etc.

    You can use the "standard" features of an Access form to enter these fields: check boxes for Yes/No fields, option groups or combo boxes for multiple choice questions.

    Before deciding how to compute the pricing, work it out on a large sheet of paper. Write down all choices that influence the fee, perhaps in the form of a flowchart. Don't hesitate to start over; in the end you must have something that describes the process of determining the fee without ambiguity.

    Depending on the complexity, you can calculate the pricing in an expression or in VBA.

  3. #3
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    Okie dokie-I'll get to it
    Thanks,

  4. #4
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    Here's one--Now I'm going to need to add a table, Guests. What I'd like to do is have a yes/no check box on my main form-If the answer is yes, I'd like a sbfGuests to open, and when complete, to focus back to the next control on the main form. This is what I think I need to do (please let me know if I'm on the right track-I'm trying to figure things out on my own before bugging you): Create a new table Guests- Auto number field for primary key. StudentId field for the student the guest is a guest of. This would be a one to many, as one student can have many guests, but each guest can be a guest of only one student. This will all have to tie into the pricing matrix once complete. Am I going the right direction?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: pricing matrix (2k)

    As you write, there is a one-to many relationship from students to guests, so it makes sense to have a separate guests table linked to the students table by StudentID.

    There is a possible exception to this. If
    a) You need to store (almost) exactly the same information about guests as about students, and
    [img]/forums/images/smilies/cool.gif[/img] You need to create lists of students and guests without hierarchy.
    In that case, you could store the guest info in the students table, and add an extra field GuestOf that is empty for a student, and contains a valid StudentID for guests.

    ---

    If the number of subforms on the main form gets too large, you can use a tab control to organize things. The guest subform could be on a tab page of its own, and you could link the visibility of this tab page to the HasGuests check box.

  6. #6
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    For the guests, I only have name, title, organization, and city info. No addresses or email, as they don't get a confirmation or receipt (these go only to the student). I'm not sure what you mean by "lists of students and guests without hierarchy". I will want to be able to determine the number of students and of guests separately. We need this for reporting purposes.

  7. #7
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    Where would I put the code to open the subform after answering yes? Would it be the OnCurrent or OnExit of the yes answer?

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: pricing matrix (2k)

    For a subform, it is a question of showing or hiding it (or, if you prefer, enabling or disabling it), not of opening it.

    You would need code in two places: in the AfterUpdate event of the check box (to react to the user's choice) and in the OnCurrent event of the form (to keep things correct when the user moves to another student). The code for both would look more or less like this:

    Me.sbfGuests.Visible = chkHasGuests

    If the check box chkHasGuests is checked ("Yes"), the subform is made visible; if the check box is cleared ("No"), the subform is made invisible.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: pricing matrix (2k)

    If you need few fields for guests, and if you want to report guests and students separately, keep to your original intention of having a separate table. It will work fine.

    By list without hierarchy, I meant something like this:

    <table border=1><td>Name</td><td>Type</td><td>Evans, Mary Ann</td><td>Student</td><td>Guin, Wyman</td><td>Student</td><td>James, Henry</td><td>Guest</td><td>Lovett, Lyle</td><td>Student</td><td>Malamud, Bernard</td><td>Guest</td></table>

  10. #10
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    Got it!

    Thanks, I just may be able to do this without too much more assistance <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16> -It's amazing how much I've learned in the last couple of weeks with your help.

  11. #11
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    This code Me.sbfGuests.Visible = chkGuests is not working. I get an error message that says Method or Data Member Not Found, and the .sbfGuests portion of the code is highlighted in the background behind the message. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: pricing matrix (2k)

    Do you have a subform whose name as a control on the main form is sbfGuests?

  13. #13
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    Yes

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: pricing matrix (2k)

    In that case, I don't understand. Visible is a valid property of a subform control.

  15. #15
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: pricing matrix (2k)

    Well, shoot. The subform shows whether or not the box is checked. I've got the same code in the OnCurrent event of the form itself, just like you said. Any clue?

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •