Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31

    combo box to update the other fields

    i am a novice user to access and databases.
    i am trying to do a simple thing which i am stuck.
    i have gone through all the forums and as i have mentioned as i am very new i cant figure out .
    i have on form different fields but what i wanted to do is to populate vendor_name as i click the vendor_name.


    i have attached the actual access file.
    if anyone can update the file and send it back or can give me detailed explanation will be highly appreciated.

    everyone is learner and i work in networks . this is totally new and exiting thing for me.

    i want to thank in advance for any help .
    Attached Files Attached Files

  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
    I'm not clear on what you want to do, but I suspect it's one of these:

    Baldy-Cascading Combos

    BaldyWeb - Autofill

    Note the "Me.Requery" you have in an event would need to be in the VBA editor:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31

    Smile really really apreciated

    Quote Originally Posted by pbaldy View Post
    I'm not clear on what you want to do, but I suspect it's one of these:

    Baldy-Cascading Combos

    BaldyWeb - Autofill

    Note the "Me.Requery" you have in an event would need to be in the VBA editor:

    http://www.baldyweb.com/FirstVBA.htm
    thanks buddy

    i am really really appreciated for your post.
    i was working on that thing for two weeks.
    so so glad that i did that.

    Thanks and regards

    A Learner

  4. #4
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31
    thanks once again
    but i am stuck again
    it works for column 1 only.
    for example it works for
    =[ID].[column](1)
    but if i have more items it returns nothing
    if in base query i select more values and then reference them by
    =[ID].[column](2)
    =[ID].[column](3)
    =[ID].[column](4)
    it just works for =[ID].[column](1) and no one after that.
    it even works if i use =[ID].[column](1) so many times but wont work for 2,3

    i am sure i am missing something. so can you please update me.
    i will be very thankful

    regards
    A learner

  5. #5
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31
    i have id the name of the combo box.
    i have selected the query
    SELECT main.ID, main.[Vendor Number], main.[Vendor Code], main.[Vendor Name], main.[Account Activation Date]
    FROM main;
    in row source of the id combo box.

    i have
    id: (Combo box)
    vendor number: (text box)
    vendor code: (text box)
    vendor name: (text box)
    account activation date: (text box)

    i use =[ID].[column](1) in vendor number and it works.
    cant understand why it wont work it vendor code, vendor name and account activation date.
    do i need to change .

    please update me.

    regards

  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,521
    Make sure the column count property of the combo is correct.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    tariq nawaz is offline Advanced Beginner
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    31
    thanks a lot for your help.
    as i mentioned i never worked before so it is hard but with this forum help i am learning but there is long way to go.
    thanks a lot for your help.

    i need to ask one more thing. when i change the column count property when i click combo box i see all the items in the combo box list.
    i am not sure whether i explained properly
    i will explain with my work
    when i click combo box i can see id, vendor number, vendor code, vendor name, account activation date.

    when i click combo box i just want to see ID not all the fields when i click this.
    i am sure there should be some property to do that.
    i will be very grateful if you update with that.

    Regards

    A learner

  8. #8
    jknight is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    8
    I am trying to do something similar but the problem that I have is when double clicking the results in Form A (Search Form) it should open Form B (Details view), it opens up a blank form. I am not sure what I am doing wrong.

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You want the column widths property. A width of 0 hides the column.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by jknight View Post
    I am trying to do something similar but the problem that I have is when double clicking the results in Form A (Search Form) it should open Form B (Details view), it opens up a blank form. I am not sure what I am doing wrong.
    Since you haven't posted your code, I don't either, but see if this helps:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    jknight is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    8
    Oops Sorry, here is the code

    Private Sub lstSingle_DblClick(Cancel As Integer)
    DoCmd.OpenForm "frmRequestsDetails", , , "RequestID" = Me.lstSingle.Column(0)

    End Sub

  12. #12
    jknight is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    8
    I been looking at it link and have been trying to get it work. What I have is a form an unbound textbox that searches the table and shows results in the Listbox, and from the listboxes user would doubeclick on particular result line and then form (with details) would show up.

  13. #13
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    For starters you have the = outside the quotes. Should be:

    DoCmd.OpenForm "frmRequestsDetails", , , "RequestID = " Me.lstSingle.Column(0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  14. #14
    jknight is offline Novice
    Windows XP Access 2007
    Join Date
    Aug 2012
    Posts
    8
    I tried putting the = before the quote and now its giving a Compile error: Syntax Error, and highlight "Me" in the debug window.

  15. #15
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 08-30-2012, 07:59 AM
  2. Replies: 1
    Last Post: 08-09-2012, 04:19 PM
  3. Update Value in Combo Box
    By j2curtis64 in forum Forms
    Replies: 18
    Last Post: 05-13-2011, 04:37 PM
  4. Replies: 5
    Last Post: 03-20-2010, 08:30 AM
  5. Use combo box to update other fields
    By Shep in forum Access
    Replies: 7
    Last Post: 07-23-2009, 03:11 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