Results 1 to 8 of 8
  1. #1
    char is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    29

    combo box on web form

    Hi,

    I have to tables.. ATWelding and Projects.
    Each [projectID] contains quite a few [ATWeldsID] .. so what I have created is a form which has the project table fields in so [projectNumber], [Project Name], [Project End Date] and [Extra Project Details]. I then have a ATWelding as a subform which contains all the fields such as [Weld ID], [Location] etc, it also has a field [ProjectNumber] and this is automatically set to what the main form [Project Number] is.
    This all works fine for entering new projects and new welds at the same time.
    However if a weld is done a week later then the 1st few welds and is therefore being put into the database later, I want to be able to find that project easily without scrolling through all my project forms, I thought of using a combo box.

    I have followed some guidelines http://blogs.office.com/b/microsoft-...arch-form.aspx



    But I can't figure out the exact changes as it doesn't show on the drop down my list of project numbers. Any help would be greatly appreciated.
    The 1st screen shot is what my form looks like. and the 2nd screenshot is what I have wrote in macro so far.
    Attached Thumbnails Attached Thumbnails screen 1.png   screen 2.png  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Why doesn't the combobox show list of projects? What is the combobox RowSource?

    Think you need to modify the WHERE CONDITION of the macro to:

    [ProjectNumber] Like [TempVars]![Project Number] & "*"

    I am not sure about the Path to Subform Control.
    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
    char is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    29
    That hasn't worked.
    The row source is SELECT Project.[Project Number] FROM Project;
    That shows all the project numbers in the drop down, but when I select one it changes the project number to what I have selected (by this I mean project number 169 changes to 26 but the name and details don't so it overwrites the proper value with the value I select in the combo box). After this it shows my error handler message. It doesnt change the project or the associated subform welding.

    Thanks for any help

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    From the link you referenced:
    A typical filter form provides unbound text boxes, combo boxes, and other controls where users can build and refine requirements for records to meet in order to be displayed on the form.

    The combobox is unbound?

    If you want to provide db for analysis, might be able to determine solution. Follow instructions at bottom of my post.
    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.

  5. #5
    char is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    29
    I am not sure how I would know if the combo box is bound or unbound. I will attach my database, It is the form now named ATW-Project that I am working on at the moment.

    Thanks for your help!
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    Data control is bound if it has a ControlSource that is a field in the form/report RecordSource.

    If the ControlSource property is not blank and references a field, need to remove. In design view the control should display 'UNBOUND'.

    I will look at your file in a couple of days if you still need help.
    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.

  7. #7
    char is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    29
    Yeah I have ensured that it is unbound. I will keep playing around with it and let you know if I solve it but would greatly appreciate if you could have a look, I am pretty sure it is the macro which is wrong but not entirely sure why.
    Thanks!

  8. #8
    char is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2012
    Posts
    29
    I have it working now thanks.
    I changed the macro to a "setfilter" and "requery" action and it worked for me!

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

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  2. Replies: 5
    Last Post: 03-12-2012, 02:58 AM
  3. Replies: 2
    Last Post: 07-26-2011, 08:26 AM
  4. Replies: 5
    Last Post: 01-02-2011, 10:09 AM
  5. Replies: 0
    Last Post: 08-17-2008, 12:19 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