Results 1 to 9 of 9
  1. #1
    Gsteel is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    9

    Post New User building first database needs help . want to click on Table Record and open assoc form

    Thanks for taking the time to read my post.


    I am building an Inventory db. Have a Table with Records and a Form tied to it. Table Records and Form Records are linked.
    Need to have a dbl click on a Table Record open the associated Form Record.
    Tried a Go To Macro but instead of running it pops an
    Error 2046: the command or action isn't available now.
    You may be in a read only database or an unconverted database from an earlier version of Access or
    The type of object the action applies to isn't currently selected or isn't in the active view.

    Is there a better way? I would like for the clerk to scroll or search the Table; click on the Record he wants; and be taken to that Record in the Form view to do data entry. Not all fields will be visible in the Table and the Form has a better layout for easy data entry. I'm sure this is possible but so far haven't found it in the 1100 page Access book I bought.

    Any suggestions?

    PS: There will probably be more posts as I go along but I really do try to find the answers on my own.

    Thanks

  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,643
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,165
    I would first make a datasheet form with the table as the source of this new datasheet form. Then you can program on click events on this form to launch other forms.
    Last edited by kd2017; 08-30-2017 at 10:47 PM.

  4. #4
    Gsteel is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    9
    Quote Originally Posted by kd2017 View Post
    I would first make a datasheet form with the table as the source of this new datasheet form. Then you can program on click events on this form to launch other forms.
    Thank you kd2017. I will look into that.

  5. #5
    Gsteel is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    9
    Quote Originally Posted by pbaldy View Post
    Thanks pbaldy. I like the link in the link, the go to record with all records available. That would be handy if entering consecutive records. Never having done VBA I have a few questions.
    Is all the black type the actual code and the green explanatory?
    Not sure about this part either.
    Dim rs As Object
    Dim lngBookmark As Long

    My Table is "Inventory By Equipment"
    The primary key is the first field "Item #" which is alphanumeric (i.e. R00100_00001).\
    The Form I want to open is "Inventory" with the same "Item #" field. In fact all the fields are the same in both Table and Form.

    Thanks
    Last edited by Gsteel; 08-31-2017 at 05:20 AM. Reason: typo

  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,643
    Correct, green lines are comments. You'd declare the variable as String and wrap the value in single quotes as done in the first link. Fields with inadvisable spaces or symbols need brackets around them.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Gsteel is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Aug 2017
    Posts
    9
    Quote Originally Posted by pbaldy View Post
    Correct, green lines are comments. You'd declare the variable as String and wrap the value in single quotes as done in the first link. Fields with inadvisable spaces or symbols need brackets around them.
    Thanks again. Still a lot of unfamiliar terms but it gives ne a direction to go.

    Thanks

  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,643
    No problem, post back if you get stuck.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by Gsteel View Post
    <snip>The primary key is the first field "Item #" which is alphanumeric (i.e. R00100_00001).\
    Some suggestions:
    Use only letters and numbers (exception is the underscore) for object names.
    Do not use spaces, punctuation or special characters in object names.
    Do not use look up FIELDS, multi-value fields or calculated fields in tables.
    Do not begin object names with a number.
    ------------------
    Bad field name: "RA#" (has the hash mark")
    Good/better field names: "RANum", "RA_Num", "RA_Number"


    Microsoft Access Tables: Primary Key Tips and Techniques
    http://www.fmsinc.com/free/newtips/primarykey.asp


    Autonumbers--What they are NOT and What They Are
    http://www.utteraccess.com/wiki/Autonumbers

    AutoNumber
    Purpose Use an AutoNumber field to provide a unique value that serves no other purpose than to make each record unique. The most common use for an AutoNumber field is as a primary key, especially when no suitable natural key (a key that is based on a data field) is available.

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

Similar Threads

  1. Replies: 2
    Last Post: 10-29-2014, 03:25 AM
  2. Replies: 4
    Last Post: 10-09-2014, 07:09 PM
  3. Replies: 2
    Last Post: 03-13-2013, 06:13 PM
  4. Replies: 10
    Last Post: 02-20-2012, 11:25 AM
  5. Replies: 3
    Last Post: 01-05-2012, 09:57 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