Results 1 to 5 of 5
  1. #1
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194

    Use textbox as criteria as "more than" this figure!

    Hey pplz


    im getting the swing of access but still using macros, havent evolved into good use of vba yet

    Im trying to run a query so i can open a report where "Owing" which as a currency value is MORE THAN a text box on a form.
    Form = ReportMenu
    Text Box = OwingMin
    Query= OwingMoney
    Report= RptOwing

    So what i tried was having the criteria in the query to be [Forms]![ReportMenu]![OwingMin] wihch works as a single value
    then i wrote >[Forms]![ReportMenu]![OwingMin] and it doesnt work at all, just gives all values... so i think im on the right track but i cant get this final step and all my googling has led me down 2 hours of frustration

    Any help at all?

    I appreciate it always!!!
    Glenn

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Owing is field name? Is this a calculated field in query?

    I never use dynamic parameterized queries. I use VBA to construct filter criteria and pass to form or report when opening:

    DoCmd.OpenReport "reportname", , , "Owing=" & Me.OwingMin
    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
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    hey June, yes it is a calculated field... im guess that will affect this?
    Ill do the vba, but can i use that with calculated or use a subquery?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Your dynamic parameter in query should work. I don't know why it fails. Would have to examine db.

    The VBA approach can work with calculated fields in the form's RecordSource. What does subquery have to do with this?
    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
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    ok i think ive got it!!!
    THanks so much June, you are always the one helping me out! I'm learning heaps with your help, so just wanted you to know i aprpreciate it!

    I found out i had mis spelt a textbox name in reports and i was referring to its control not its name due to that error!

    I got the >textbox working now.
    It is using a macro at moment but im going to covert all these to vba one at a time and learn the vba code the macro that i understand so that i can stop workingin macros

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

Similar Threads

  1. Replies: 4
    Last Post: 08-26-2014, 05:52 PM
  2. Replies: 3
    Last Post: 12-17-2013, 08:27 AM
  3. Replies: 1
    Last Post: 01-05-2013, 10:46 PM
  4. Replies: 1
    Last Post: 04-05-2012, 08:26 AM
  5. Passing criteria "NULL" or "IS NOT NULL" to a query
    By SgtSaunders69 in forum Forms
    Replies: 1
    Last Post: 12-24-2011, 02:22 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