Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Nov 2001
    Location
    Burbank, Illinois, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Strange acting form (Access 2002/sp-2)

    I have a strange acting form. When you click on add new po from the switchboard a blank form opens to add vendor, shipping and billing info which is exactly what I want. When you then click on the Add Order cmd button, a second form opens to add the actual purchase information but it is not blank! I have the data entry property set to yes and I can not figure out why you need to click on the arrows at the bottom of the form to get to a blank form. Can someone please help me?

    Thanks
    Wendy

  2. #2
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange acting form (Access 2002/sp-2)

    Wendy,

    Check your switchboard entry for that button... If you chose "open form in edit mode" instead of "open form in add mode" by mistake, this would be the result...
    HTH

  3. #3
    Star Lounger
    Join Date
    Nov 2001
    Location
    Burbank, Illinois, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange acting form (Access 2002/sp-2)

    Trudi

    I have "open form in add mode" selected and it opens the first form "orders by vendors". From this form, you click on the button "open orders form" and it comes up all the records and you need to scroll thru to get to a blank form. I am ready to scream over this!

    Thanks for the help
    Wendy

  4. #4
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange acting form (Access 2002/sp-2)

    <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> ...It's okay Wendy... Calmmmm... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    I'm not laughing at you... It's just that I've been there, trust me!!!!

    We'll fix it...
    Okay... The Orders form is not opening from the Switchboard, but rather the Vendors form....
    We need to check the statement that opens that form and then the property settings in the Orders Form... Do you have a DoCmd.OpenForm statement in the On Click event for that command button?

  5. #5
    Star Lounger
    Join Date
    Nov 2001
    Location
    Burbank, Illinois, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange acting form (Access 2002/sp-2)

    I just get so aggrevated! I do have it and here it is:

    On Click:

    Private Sub Orders_Click()
    On Error GoTo Err_Orders_Click
    If IsNull(Me![VendorID]) Then
    MsgBox "Enter vendor information before entering order."
    Else
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    DoCmd.OpenForm "Orders", , , , acEdit
    End If

    Exit_Orders_Click:
    Exit Sub

    Err_Orders_Click:
    MsgBox Err.Description
    Resume Exit_Orders_Click
    End Sub

    Here is what I have for the actual "Order" form

    On Current:
    Private Sub Form_Current()
    If IsNull(Me![OrderID]) Then
    DoCmd.GoToControl "EmployeeID"
    End If
    End Sub

    On Open:

    Private Sub Form_Open(Cancel As Integer)
    If Not IsLoaded("Orders by Vendor") Then
    MsgBox "Open the Orders form using the Orders button on the Orders by Vendor form."
    Cancel = True
    End If
    End Sub


    On Activate:

    Private Sub Form_Activate()
    On Error GoTo Err_Form_Activate
    Me.Requery
    If IsLoaded("Orders by Vendor") Then
    If Forms![Orders by Vendor]![Orders by Vendor Subform].Form.RecordsetClone.RecordCount > 0 Then
    DoCmd.GoToControl "OrderID"
    DoCmd.FindRecord Forms![Orders by Vendor]![Orders by Vendor Subform].Form![OrderID]
    End If
    End If

    Exit_Form_Activate:
    Exit Sub

    Err_Form_Activate:
    MsgBox Err.Description
    Resume Exit_Form_Activate
    End Sub

    I keep staring at it and can't figure it out! I know it is going to be something stupid because it usually is!

    Thank you for all your help!
    Wendy
    <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>

  6. #6
    3 Star Lounger
    Join Date
    May 2002
    Location
    Toronto, Ontario, Canada
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange acting form (Access 2002/sp-2)

    There it is... <img src=/S/smile.gif border=0 alt=smile width=15 height=15> ... See the DoCmd.OpenForm line below?? ...You've got it opening in Edit mode (acEdit)... That will override the properties you have set... Change it to acAdd and it should work as you want...

    On Click:

    Private Sub Orders_Click()
    On Error GoTo Err_Orders_Click
    If IsNull(Me![VendorID]) Then
    MsgBox "Enter vendor information before entering order."
    Else
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    DoCmd.OpenForm "Orders", , , , acEdit
    End If

    Exit_Orders_Click:
    Exit Sub


    Let me know if there's anything else... <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  7. #7
    Star Lounger
    Join Date
    Nov 2001
    Location
    Burbank, Illinois, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Strange acting form (Access 2002/sp-2)

    Well, don't I feel like a moron! <img src=/S/shocked.gif border=0 alt=shocked width=15 height=15> I can't thank you enough for finding this for me. I can not tell you how many times I have read that back to m yself. I guess that is why it always better to ask for help! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Thank you again!
    Wendy

Posting Permissions

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