Results 1 to 2 of 2
  1. #1
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194

    How to create a query field dependent on a form field?

    I'd like to know if there is a way to make a field in a query dependent on a value from a text field on a form. Namely, I'd like to take a field from a table and multiply it by a value from a field on a form.


    I tried "Input(mg): [Percent]*[forms]![frm_Formulation]![Text4]" but the field is blank when I run the query.
    When I remove "[forms]![frm_Formulation]![Text4]" my percent field shows up as it should.

    Cross posted from https://stackoverflow.com/questions/...n-a-form-field

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    And you don't get a popup prompt to enter Text4 value? Sorry, since syntax is correct and assuming textbox has value, can't explain why this fails. However, why reference a form textbox? Is this value not saved to a table? What do you want to do with the query? Is it RecordSource for a report?

    If you want to provide db for analysis, 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.

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

Similar Threads

  1. Arranging a dependent field in a form
    By Bradex in forum Forms
    Replies: 7
    Last Post: 03-18-2016, 05:28 PM
  2. Replies: 2
    Last Post: 09-03-2013, 06:00 AM
  3. Replies: 18
    Last Post: 10-25-2012, 10:57 PM
  4. Replies: 1
    Last Post: 03-27-2012, 01:30 PM
  5. Creating a query with a self-dependent field
    By lottrup in forum Queries
    Replies: 0
    Last Post: 06-20-2011, 04:30 AM

Tags for this Thread

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