Results 1 to 9 of 9
  1. #1
    ifraet is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2013
    Posts
    5

    Urgent: Using a combo box to populate a form for updating record.


    Hi, everyone. I am working on a simple project but I am stuck. I want to create a form that allows a user to update a recordset from tbUsers and tbEmployment which share a one-to-many relationship. I want the user to use a combo to select UserID which then populates the form which contains textfields from tbUsers and a subform from tbEmployent. After making the necessary changes, the user will just click an update button. My project contains little code for it isnt a bulletproven one. But I realise to achieve the above, I need coding. Someone please save a poor laddie!

    PS: the combo boxes in the mobile view of this site do not work.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,964
    Actually, what you want can be done without code by using the intrinsic Access search and filter tools from the ribbon and the right click shortcut menu. However, for casual users those tools might not be intuitive enough and they are less versatile.

    So, review this tutorial for one method http://datapigtechnologies.com/flash...tomfilter.html

    Edits are committed to table when form closes, move to another record, or run save record code.
    Last edited by June7; 08-09-2013 at 05:37 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ifraet is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2013
    Posts
    5
    Thanks so much for the help. But the link you provided is not working. :-( I

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I just tried the web page June provided and it opened - the clip started playing....... using FireFox.

  5. #5
    ifraet is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2013
    Posts
    5
    Thanks. I think the problem is my trying to access it with my phone: the video doesnt play. I accessed the main site and saw many helpful topics under accessmain. I will use a computer tomorrow at a cyber cafe. Will get back to you as soon as I do that. Thanks so much!
    .................................................. ................
    I came, I saw, ...yet to conquer
    .................................................. ................

  6. #6
    ifraet is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2013
    Posts
    5
    Hey, guys. I tried accessing the file with a brother's blackberry phone but it didn't play. All efforts to do it are to no avail. Could you please explain it here? Please....

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,964
    Why aren't you trying on a computer?

    Bing: Access parameterized query wildcard

    Here is another http://www.techonthenet.com/access/q...parameter3.php
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    ifraet is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2013
    Posts
    5
    Thanks so much... I have read the operation described on that link. I do not see how it helps solve my problem. Can't I just use some VBA code at the After Update event of the Combo box to pull up the data to the textfields and the subform for update? Been reading about VBA lately. I think I can handle little code. Please... Thanks in advance.

  9. #9
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,964
    You can use the parameterized query technique to filter main form to the record for specified UserID. Then the subform will display only those records associated with the main form record.

    Other techniques do not use parameterized query and involve a little more code. Although could be as simple as:

    Me.Filter = "UserID=" & Me.comboboxname
    Me.FilterOn = True

    or as complex as http://allenbrowne.com/ser-62code.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 8
    Last Post: 02-09-2012, 02:02 PM
  2. combo box to Populate a form
    By rcappy in forum Forms
    Replies: 1
    Last Post: 01-30-2012, 03:07 AM
  3. Populate combo box with Record Set in Access 2003
    By ganeshvenkatram in forum Access
    Replies: 2
    Last Post: 06-20-2011, 04:10 AM
  4. Use Combo Box to Populate Form
    By gracysaurus in forum Forms
    Replies: 1
    Last Post: 08-09-2010, 02:40 PM
  5. combo not updating form
    By cjamps in forum Forms
    Replies: 5
    Last Post: 04-14-2009, 12:00 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