Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: Datasheet Column Order in Code

    I have some unbound subforms that are datasheets - there seems to be having trouble saving the column widths and order. I set the sizes, save the form and when opened again the sizes are off....

    Is there a way to set the widths and order of the datasheet columns when the form opens? I do want the user to be able to move and size columns if desired, but the next time the form opens I want the order and sizes to be reset.

    Example: Qty - Stock No. - Description - Unit - Price

    I'd like to size and order the columns as follows when the form opens -

    order 1. Qty - .75"
    2. Stock No. - 1.25"
    3. Description - 2.5"
    4. Unit - .5"
    5. Price - 1"

    if a user changes the order or sizes, fine for that session, but next time the form opens up, reset the order and sizes as above...

    Thanks - AB

  2. #2
    Join Date
    Jul 2003
    You would have to open the form in design view, make your adjustments, save it, then open it in the regular view.

    An easier way might be to keep your users from saving the form when they change it. Turn off the Close button on the parent form, and desigin an
    Exit command button to close the form. The exit button's code would then be
    DoCmd.Close acForm, "FormNAme",, acSaveNo
    That will close the form, without saving the changes.
    Inspiration Through Fermentation

Posting Permissions

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