Results 1 to 7 of 7
  1. #1
    eliotchs is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Posts
    24

    ? on default textbox value to query criteria

    Hi



    So now that I have the SEQ setup for a new record I am running into moving the CLINO to the new record..

    The form has a criteria (passed value, if it matters) of "CLINO"

    The query picks up all the records for that CLINO

    in the form I use the next record button to go through the records
    but once I hit a new record I want the CLINO to use the passed criteria or the field in the query that has the CLINO, since its the same

    Hope this makes sense ....

    Thanks
    Joe

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Not real clear but...

    You can use the On Current event to pass field values to variables and vise versa.

    strCLINO = ""
    if Me.NewRecord = false then
    if not isnull(Me.CLINO)
    strCLINO = Me.CLINO
    end if
    else
    Me.CLINO = strCLINO
    end if

  3. #3
    eliotchs is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Posts
    24
    Im not sure if I am doing this wrong ..

    Here is what I need

    the form gets the CLINO from the parameter in the query

    I am using the record selector button go through the records and to add a new record.
    I need to pass the CLINO when they add the new record.

    I'm thinking I can use the previous records CLINO since it is only one CLINO, maybe set it as the default ?

    Just not sure how to setup

    Thanks

  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
    53,771
    Maybe should be using form/subform arrangement?
    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
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by eliotchs View Post
    ...maybe set it as the default?

    Thanks
    Still confused. You can use literal values as a default value for fields and controls.

  6. #6
    eliotchs is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2011
    Posts
    24
    I did go with the form/subform, but is there a way to limit it to add only one record on the subform instead of it wanting to add another after it tabs through the last field?

    Thanks

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Maybe set the subform's Cycle property to Current.
    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. Form Textbox based on a Query Criteria
    By Peace in forum Queries
    Replies: 4
    Last Post: 05-07-2014, 01:05 PM
  2. Query criteria based on Form TextBox value
    By stildawn in forum Queries
    Replies: 8
    Last Post: 11-10-2013, 04:53 PM
  3. Set Default criteria to query
    By quicova in forum Queries
    Replies: 1
    Last Post: 09-13-2013, 08:41 AM
  4. Replies: 1
    Last Post: 10-28-2011, 02:46 PM
  5. In query: check criteria with default value
    By hoachen in forum Access
    Replies: 1
    Last Post: 07-12-2011, 10:23 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