Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Your sample database does not work, I am getting the same error when I try to open sfrmActivity_List



    You have a criteria in the query driving that subfrom of :

    fOSUserName()

    The function is not defined in your sample database, fix the criteria or add the function please. I can not guess unless your desired result is that you:

    1. Choose a user from a combo box on your MAIN FORM (main form is an unbound form)
    2. the list box in the subform is updated with items related to that user
    3. select the item from the list box you want to edit which opens another form that relates to the item selected on your subform.

  2. #17
    pfales is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    23
    I will work on it and see what I can do to resolve the issue. then try and repost. Thank you for your time and patience though

  3. #18
    pfales is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    23
    Tried to rework it last night however, I was not able to get it to function with out the =fOSUserName() or the =fnGetUserID() function.

  4. #19
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    It sounds like your double-click is opening your original form, bound to a query of some sort, and not changing the current record position in the query to establish your desired current record. I'm not sure how to position within a dynaset in a form that isn't yet open, so here's one method to achieve your goal.

    1) Back up your database and use a "play" copy.
    2) Clone the data entry form to a new name.
    3) Clone the query to a new name.
    3) change the double-click to
    (A) save the current record key in a Access 2010 temp variable
    (B) open the new form name.
    4) change the query to use the temp variable key (only)

    There may be easier ways, but that should work.

  5. #20
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27
    I think I know were you are going with this and I do the same thing. I do a search for a part then I allow the user to click on it and they then can edit the part or just view it. It is not a double click just a click, here is how I do it.

    I changed the code using the file you have posted on the boards. Add this information to the sfmActivity_List. Click the Field and follow the instructions you I have posted. I would do it for you but I am getting 2 errors on your the subform.

    Select the field and click on the events tab in Property Sheet, then go to On Click. Press the ... next to the down arrow and select code builder. Copy and past the code all you need to do is change were I have "formName". If the form you want to open is frmDaily the put that inside the quotes. You do the same code and the same steps for each field you want to click on ex. Date, UserID, Program, Information.

    Now 2003 is different but the code will work. I am just not sure how to add the code, I think someone here might be able to help.

    Dim varWhereClause As String
    varWhereClause = "DID=" & Me!DID
    DoCmd.OpenForm "formName", acNormal, , varWhereClause, , acDialog


    DID is the key field change this if your key field is different.
    formName is a form that you make or you can use a from you already made to do the edit.
    This information goes between the On Click and end sub.

    I made this as simple as I could I hope it will help.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Selecting a record for a report
    By TToc2u in forum Reports
    Replies: 1
    Last Post: 03-05-2013, 02:07 PM
  2. Selecting record in foreign table using VBA
    By Jmeyering in forum Programming
    Replies: 3
    Last Post: 11-12-2012, 04:29 PM
  3. Selecting record in subform
    By survivo01 in forum Forms
    Replies: 8
    Last Post: 10-29-2012, 08:30 AM
  4. Replies: 9
    Last Post: 09-16-2011, 03:52 PM
  5. Record Selecting
    By dbprogman in forum Programming
    Replies: 5
    Last Post: 04-27-2011, 10:35 PM

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