Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    lancham is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2016
    Posts
    17
    record source explicitly says populate etc and not the actual SQL

  2. #17
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'll have to admit you have me stumped. Any chance you could post your db; removing any sensitive data of course?

  3. #18
    lancham is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2016
    Posts
    17
    i don't have a problem with that, but I can't see an obvious way of doing it.

    thanks

  4. #19
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do a Compact and Repair, Zip up the db, then go to Advanced when posting and scroll down a bit.

  5. #20
    lancham is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2016
    Posts
    17
    zip attached. thanks
    Attached Files Attached Files

  6. #21
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You had DataEntry set to YES. That will only show NEW records.

  7. #22
    lancham is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2016
    Posts
    17
    hi

    that makes sense. however, i've set that to No, but my onClick still returns no records. i've tried just having me.requery, docmd.requery, me.refresh, but the detail section won't populate, and still get 0 records returned.

    thanks

  8. #23
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Change the name of your 3 controls to match the query "Forms!..." entries. I forgot I had changed them.

  9. #24
    lancham is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2016
    Posts
    17
    thanks. so is it just me.requery for OnClick? this does not work but....i've just double-clicked the query in the left hand pane and I get a datasheet with the correct record returned???????

  10. #25
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about this one? I have to leave for several hours. I'll check back later.
    Attached Files Attached Files

  11. #26
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    they're all bound controls based on the only table I'm using
    Shouldn't they be bound to the query or sql statement you posted and not the table?
    Sorry, ignore. I was working off of an out of date page.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #27
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Okay, here’s what I changed.

    1. Turned off Data Entry
    2. Changed the query references to the actual names of the three controls
    3. Changed the button code to just Me.Requery
    4. Turned on Navigation buttons so I could see what’s happening
    5. Saved the query to a name using CamelFontName without spaces
    6. Pointed the form to the new query

    MS Access tries to help sometimes. As a result, if it can’t find a control with a particular name, it looks for a field with that name. It is why I and many developers change the name of our controls so it does not match the name of the bound field. MS Access defaults to naming a bound control the same as the field to which it is bound. This can cause unintended consequences and confusion.
    Names with embedded spaces in them can on occasion be problematic. It is why I use CamelFontNames but you can use the under_score if you prefer. Try and avoid names with embedded spaces.
    Attached Files Attached Files

  13. #28
    lancham is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    May 2016
    Posts
    17

    Thumbs up

    thanks RuralGuy. took out the spaces in the query name etc and away I went. Thank you very much for your invaluable help

  14. #29
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Very glad we could help.

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

Similar Threads

  1. Replies: 0
    Last Post: 06-03-2014, 05:15 AM
  2. Autofilling controls on a form
    By yuvraj.date in forum Forms
    Replies: 13
    Last Post: 09-18-2012, 12:53 PM
  3. Replies: 1
    Last Post: 01-25-2012, 06:46 PM
  4. Autofilling when New Record Created from Form
    By SpdRacerX in forum Forms
    Replies: 6
    Last Post: 01-24-2012, 10:24 AM
  5. Replies: 3
    Last Post: 01-24-2012, 02:44 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