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

    Form format (A2k)

    How can I evenly space the control labels and text boxes on my form "all at once"? When I use AutoForm, everything is nicely spaced, but when I start moving things around, it gets all messy. I keep doing this in what I would term as the Long Way by selecting two controls and then formatting to left, top, etc. I want to be able to select all the controls and format them together. Is this possible?? For instance I would like to change all my control labels to 10pt Ariel Bold without selecting each individual label and doing it.

  2. #2
    Lounger
    Join Date
    May 2002
    Location
    Fort Worth, Texas, USA
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form format (A2k)

    Gabi,

    Use a Shift /Click to select and deselect various controls. You can also Shift/Drag to select controls. The properties that they share will be available for update.

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

    Re: Form format (A2k)

    You can select multiple controls by
    a. Clicking the first one, then Shift+clicking subsequent ones. Shif+clicking an already selected control deselects it.
    b. Draw a rectangle around the controls to be selected. By default, all controls enclosed entirely of partly within the rectangle will be selected. You can modify this behavior in the Forms/Reports tab of Tools | Options...
    c. Selecting Edit | Select All or pressing Ctrl+A to select all controls (on a tab control, only those on the current page, otherwise, all controls on the form)

    Once you have selected multiple controls, any property you set will be applied to all of them, for instance the Font, or the Visible property.

    Check out the Format menu; it contains options to align selected controls (make their Top, Bottom, Left or Right properties the same, or align them to the grid)), resize them (make all the same width as the widest or narrowest, or make all as high as the tallest or shortest, or to size them to the grid), and to increase, decrease or equalize their horizontal or vertical distances.

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

    Re: Form format (A2k)

    Hi, thanks for the response. I'm aware of and use all of these methods, but must be doing something wrong. I'll figure it out! I'm probably not paying close enough attention to the title bar of the selection when I'm doing this.

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

    Re: Form format (A2k)

    Okay, I've got that figured out. I've entered a few records on this form-there is one combobox control on this. I typed in the list myself and asked Access to save the info for later use. I enter first record and choose an item from the drop down box. When I move on to the next record and change the item for the new record, it also changes the item on the preceding record. Why is this happening?

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

    Re: Form format (A2k)

    Can you answer the following questions about the combo box?
    1. What is the Control Source
    2. What is the Row Source
    3. What is the Number of Columns
    4. What are the Column Widths
    5. Is there any event code associated with the combo box, and if so, what is that code? (If you select the combo box, does any of the events in the Events tab of the Properties window say "Event procedure"? If so, click the three dots to the right.)

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

    Re: Form format (A2k)

    Hi Hans,

    I fixed it by reviewing the "control source" definitions that Charlotte and yourself gave me in a previous thread. I just didn't have anything listed in that box.

    I'm reworking how I have things set up. I've got one table for all attendees named tblParticipants. My combobox has a list from tblParticipantTypes. When I enter a person as a guest, I would like a control to appear on the form that says "Guest of" where I will then enter the Participant # (primary key from tblParticpants) of the person the guest is a guest of. I would assume that this would be an event property of the combobox as defined by the answer, but not sure how to tackle this. Can you help?

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

    Re: Form format (A2k)

    Gabi,

    You need to have code for this in two places:
    <UL><LI>In the After Update event of the "participant type" combo box, to show or hide the "guest of" text box or combo box when the user changes the participant type.
    <LI>In the On Current event of the form, to show or hide the "guest of " text box or combo box as the user moves from record to record.[/list]The exact code depends on the names of the controls.

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

    Re: Form format (A2k)

    Is it possible to have different instructions dependent upon which choice is made in the combo box? For example, in addition to the "guest" instruction, say I choose "Faculty". I would like a small form (not sure a form is how to accomplish this) to open into which I can enter the class they are teaching.

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

    Re: Form format (A2k)

    I don't know what you mean by "in addition to". In a combo box, you can only make one selection: either guest or faculty or ..., but not several at once.

    To handle the various choices, enter a new concept <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>: the Select Case instruction. Assuming that the participant type combo box is named cboParticipantType and is bound to a numeric ID field, the outline for the code could look like this (the actual values will vary):

    Private Sub cboParticipantType_AfterUpdate()
    Select Case cboParticipantType
    Case 1 ' regular participant
    ' Put stuff to do for regular participants here
    Case 2 ' faculty
    ' Put stuff to do for faculty here
    Case 3 ' whatever
    ' Put stuff to do whateverhere
    Case Else ' everything not covered before
    ' Put stuff to do for other cases here
    End Select
    End Sub

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

    Re: Form format (A2k)

    I meant to ask if it was possible to have more than one set of instructions for one combo box. I know that virtually anything is possible with code and your help!!

    Oh, yay, a new concept to confuse me <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15> . Very good. This was exactly what I meant. Something that says (in computer speak of course) If I choose guest, this (or these) things happen, If I choose faculty......Now I just have to figure out what I want to have happen!!

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

    Re: Form format (A2k)

    I know we've covered this subject before, but not exactly this question--While I need the billing and class information to maintained with the student information, the use of subforms is necessary. Can I set it up to where I use a command button to open the subforms as opposed to them always being visible on the main form? Such as cmdEnterClasses and cmdEnterBilling? I don't want to use tab controls if I can avoid it.

    Or, do I have to use subforms?? What if I just set up frmBilling and frmClasses that open from command buttons on frmStudents?

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

    Re: Form format (A2k)

    Gabi,

    1. You can use command buttons or toggle buttons or check boxes to control the visibility of subforms - just set the .Visible property of the subform control to True or False according to what you want.

    2. It is possible to open frmBilling (etc.) as a separate form in the On Click event of a command button. You will probably want to open it as a dialog form (i.e. floating over all other forms, and the user has to close it before being able to to anything in another form again.) You will need to set the default value of StudentID when the form is opened - this is not taken care of automatically (as opposed to subforms, that handle this themselves).

    Example code (not meant as finished code, just as an example):

    On the main form:

    Private Sub cmdGuests_Click()
    DoCmd.OpenForm FormName:="frmGuests", WhereCondition:="intStudentID = " & Me.intStudentID, WindowMode:=acDialog
    End Sub

    On frmGuests:

    Private Sub Form_Open()
    Me.intStudentID.DefaultValue =Forms!Students!intStudentID
    End Sub

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

    Re: Form format (A2k)

    Ah, excellent!

    Thanks Hans

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

    Re: Form format (A2k)

    When I choose PaymentType check, or Payment Type credit card, I would like only the controls on the sbfBilling that apply to the specific payment type to appear. For check the controls are check number and check amt. For credit card they are cctype, ccNumber, ccAmount, ccExpDate and NameOnCard. Can this be done?

Page 1 of 2 12 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
  •