Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2011
    Posts
    4

    Unanswered: Populate a field based on filter Value

    Hello, I would like to populate a field on my form with the value of "filter" on the property sheet of my form.

    Hope someone can help...

    Thanks!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    I guess you mean populate a control on the form (it should work for a field too):
    Code:
    Me.Text_Filter.Value = Me.Filter
    Have a nice day!

  3. #3
    Join Date
    Oct 2011
    Posts
    4
    Actually I have a button called "Add Order" which adds a NEW RECORD to the table linked. And I would like to, when clicked, to have the filter value of the form I am on (Requisitions_frm), to be copied into a field called "Group".

    Would this be possible to do?

    Still new at VB

    Any help appreciated...

  4. #4
    Join Date
    Oct 2011
    Posts
    4
    Ok I found out how to do it

    Group.Value = Me.Filter

    My problem now is that it returns unwanted text:

    [Group] = 'IS Development'

    I would just like to keep the "IS Development" part of this text..

    Thanks

  5. #5
    Join Date
    Oct 2011
    Posts
    4
    The value "IS Development" is also a variable...

  6. #6
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Try:
    Code:
    Group.Value = Mid(Me.Filter, Instr(Me.Filter, "=") + 1)
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •