Results 1 to 8 of 8
  1. #1
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15

    Open form to add new records

    This is probaly a simple thing, but any help would be appreciated. I have a Customers form and would like to install a command button that opens the NewShipment form to Add New Record. I am using Access 2010 and my design so far is;
    CustomerTbl


    ShipmentTbl
    PartTbl
    PartTypeTbl
    One to Many (CustomerTbl to ShipmentTbl)
    One to Many (ShipmentTbl to PartTbl) a shipment will contain many customers
    One to Many (PartTble to PartTypeTbl)
    My logic is that a customer will have many shipments. Shipments will include multiple customers and many parts. The many parts will be of many types. Now if this confuses you it is ok, I am confused myself. Any helps any one could give a monkey banging away at his keyboard would be appreciated.


    Cosmo
    So Simple a Monkey could do it, yeah right!
    Last edited by Cosmo Monkey; 04-12-2013 at 08:31 AM. Reason: clarification

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If you look in help at the arguments of OpenForm, one of them allows you to open the form in data entry mode.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15
    OK...now to show my ignorance...is this correct? (Obviously not, it isn't working)


    Private Sub Command1_Click()
    DoCmd.OpenForm "Shipments", acNormal
    DoCmd.GoToRecord , , acNewRec
    End Sub

    Cosmo
    still banging at the keyboard

  4. #4
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15

    OMGosh

    just as I posted that, I realized that through my trials and efforts I had used and deleted a couple command buttons. I was trying to call from a deleted command button. Corrected the Command1_Click() to Command106_Click() and wa la...it works...yes....I have figured 105 ways that didn't work. getting closer to that light bulb. Thanks you sir....
    Cosmo
    A monkey could do it....with a little help!

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    That's a different method than I had in mind, but would be the one to use if you wanted the user to be able to go back to existing records. Normally I wouldn't open a form to all records though, unless it was small. In any case, I suspect you need to add the arguments to the GoToRecord line that specify the form. More info in help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Ah good, glad you got it working!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Cosmo Monkey is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    15
    Being new here I do not know how to mark this solved. I know other people seem to looking for answer to what seems to be similar request in other forums. I joined this one because there seems to be some bright minds here.
    Cosmo

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    The Solved option is under Thread Tools at the top of the thread.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 06-13-2012, 05:57 AM
  2. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  3. open another form with same records.
    By manic in forum Forms
    Replies: 10
    Last Post: 02-08-2012, 02:18 AM
  4. open form if no records in query
    By MiaAccess in forum Forms
    Replies: 1
    Last Post: 03-05-2011, 12:11 PM
  5. Open form to filtered records
    By ducecoop in forum Access
    Replies: 3
    Last Post: 10-22-2010, 10:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums