Results 1 to 4 of 4
  1. #1
    rajikasimu is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2015
    Location
    Kano
    Posts
    8

    VB code for docmd.


    Hi, Friends,
    I am developing a simple package as a leaner in Access, I have a form(named Admin2) displaying two fields namely USERNAME and PASSWORD from a table named MASTER. i have another form namely Changer1 with a combobox named combo10 displaying the field username from the table (MASTER) and a command button. i want anytime I select a username from the combo and click on the command button to open the form (Admin2) with the selected value of the combo.
    I have this code at the click_event of the CommandBttn
    DoCmd.OpenForm "admin2", , , "userName = & Me.Combo10.Column(1)"
    it give me syntax error(missing operator) in a query expression
    please help

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

  3. #3
    rajikasimu is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2015
    Location
    Kano
    Posts
    8
    Thousands of thanks to you guys especially Pbaldy, your codes really solve my recent problem.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help!
    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: 6
    Last Post: 01-27-2015, 02:00 PM
  2. DoCmd.RunSQL
    By Access_Blaster in forum Programming
    Replies: 6
    Last Post: 07-23-2013, 09:27 PM
  3. Replies: 10
    Last Post: 03-12-2013, 01:41 PM
  4. Replies: 4
    Last Post: 01-05-2013, 04:32 PM
  5. DoCmd****nSQL
    By uncletreetrunk in forum Access
    Replies: 8
    Last Post: 07-17-2012, 10:13 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