Results 1 to 11 of 11
  1. #1
    disturbedgod is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    6

    Form doesn´t update with Query.

    Hi All… how are you doing?




    I´m new to this site, and I’m not very good at Access. J

    So, if you could help me with a problem that I have about my database, that would be great.


    Here it goes…


    My database is about a Construction Company. I have SubContractors info that are Organized by the work they do (Concrete, Iron, FormWork… etc).

    So, I have a Form (frmCustomers), that as a SubForm (frmMultiselect) in it.

    In the Form, i have One Combobox (cboSelected), that gives the user the ability to see and choose all of the Works that i have in the Database, and one ListBox (lista9) that when the user chooses the Work in the Combobox, a list of Companies that make that work appears, and the user gets to choose the company that he wants to see the details, by selecting the company and by clicking on a button (comando15). The button creats in a query (qryMultiselect) the information about that company.


    In the SubForm, that´s inside the Form, i have fields that shows the data from the Company that the users selected in the Listbox (lista9).


    The Problem here, is that the SubForm only updates the information about the Company that the user selected when i Close the Form and then Open it again. I want that when the user presses the button (comando15) the information in the form updates automatically.
    In the button (comando15), i´ve tried to creat a code that Requerys the Subform. But it doesn´t work.


    Sorry about the English… hope you guys understand the problem.

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    I suspect that your subform is not properly linked to your form. Verify the subform's Master Link and Child Link properties.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    DoCmd.RunCommand acCmdSaveRecord will save the current record.

  4. #4
    disturbedgod is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    6
    Quote Originally Posted by llkhoutx View Post
    I suspect that your subform is not properly linked to your form. Verify the subform's Master Link and Child Link properties.
    How can i see this?
    I´ve made the SubForm (frmMultiselect) inside the Form with the draw comand "Subform/Subreport"

    Quote Originally Posted by RuralGuy View Post
    DoCmd.RunCommand acCmdSaveRecord will save the current record.


    This doesn´t seem to work. Where should i put it? In the end of the code of the button?!

    Thank you.


  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by disturbedgod View Post
    This doesn´t seem to work. Where should i put it? In the end of the code of the button?!

    Thank you.
    It should be the *FIRST* line of code behind your button.

  6. #6
    disturbedgod is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    6
    It still doesn´t work RuralGuy...

    Do you think i can post the database here and you can see what the problem is?

    Thank You
    Hugo

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Go ahead and post your db. Someone here will probably look at it and come up with a solution. Be sure and first Compact and Repair the db and then zip it up before posting.

  8. #8
    disturbedgod is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    6
    Ok... i´ve done all that you have asked...

    Hopefully someone will find out the problem.

    Thank You.
    Hugo

  9. #9
    disturbedgod is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    6
    Can´t nobody help?! :S

    Thank you
    Hugo

  10. #10
    thhui is offline Competent Performer
    Windows XP Access 2002
    Join Date
    Feb 2009
    Posts
    235
    Could you convert it to mdb 2000 format first and zip it and upload it again?

  11. #11
    disturbedgod is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2010
    Posts
    6
    Quote Originally Posted by thhui View Post
    Could you convert it to mdb 2000 format first and zip it and upload it again?
    Thank you thhui, but i have already found a way to do what i wanted. I´ve created a button that on the second click the Form (frmMultiselect) opens separated from the main one, and the info is updated.

    Thank you again to all.
    Hugo Bastos

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

Similar Threads

  1. Update Query
    By Najeeb in forum Queries
    Replies: 1
    Last Post: 11-19-2015, 04:02 AM
  2. Update Query- selective update?
    By stephenaa5 in forum Queries
    Replies: 1
    Last Post: 10-29-2009, 11:15 AM
  3. Help with update query
    By weirdg in forum Queries
    Replies: 0
    Last Post: 09-03-2009, 04:21 AM
  4. Update Query from Form
    By ste_pie87 in forum Queries
    Replies: 2
    Last Post: 04-26-2009, 07:22 PM
  5. Need help with Update Query
    By starswinger007 in forum Queries
    Replies: 1
    Last Post: 02-22-2006, 08:44 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