Professional Web Applications Themes

text boxes values - Microsoft Access

Hi Rathika, A simple way to do this is to make the tabular form a subform then on the mainform, use the combo box as the LinkMasterField and use the related field in the LinkChildField of the subform. This way Access will always filter the subform for you based on the selected value in the combo. Otherwise, you would need to use the AfterUpdate event to either set and apply a filter to the form or modify the form's Recordsource query to use the combo's value in the Where Criteria. For example, if your combo was used to filter a ...

  1. #1

    Default Re: text boxes values

    Hi Rathika,

    A simple way to do this is to make the tabular form a subform then on the
    mainform, use the combo box as the LinkMasterField and use the related field
    in the LinkChildField of the subform. This way Access will always filter
    the subform for you based on the selected value in the combo.

    Otherwise, you would need to use the AfterUpdate event to either set and
    apply a filter to the form or modify the form's Recordsource query to use
    the combo's value in the Where Criteria.

    For example, if your combo was used to filter a list of customers by City
    (text) then your AfterUpdate event might look like this:

    Private Sub Combo24_AfterUpdate()
    Me.Filter = "City=""" & Me.Combo24 & """"
    Me.FilterOn = True
    End Sub

    If the field you are using as a filter is numeric then you don't need all
    the extra double quote characters.

    --
    Sandra Daigle
    [Microsoft Access MVP]
    For the benefit of others please post all replies to this newsgroup.

    rathika wrote: 

    Sandra Guest

  2. #2

    Default text boxes values

    hi sandra,

    i wrote the afterupdate event for the combo box.

    it works for the first value in the combo box. then
    for subsequent values in the combo box always the first
    record of the table gets displayed along with matching
    records.ie if there are 2 matching records then we get 3
    ,if there are 3 matching records then we get 4 like that.

    how do i solve this, i have been trying all this time
    with pain in vain.

    rathika

    rathika Guest

  3. #3

    Default Re: text boxes values

    I'm not sure what might be going on - please post your code along with a
    description of the fields and their datatypes.

    --
    Sandra Daigle
    [Microsoft Access MVP]
    For the benefit of others please post all replies to this newsgroup.


    rathika wrote: 

    Sandra Guest

  4. #4

    Default Re: text boxes values

    Hi Rathika,

    Is cboProjectNR bound or unbound? In other words, is there anything in the
    ControlSource property of the combo? For the way you are using it I think it
    should be unbound.


    --
    Sandra Daigle
    [Microsoft Access MVP]
    For the benefit of others please post all replies to this newsgroup.

    rathika wrote: 

    Sandra Guest

Similar Threads

  1. Can we bind the values from cfselect to display thoseinto cfinput text boxes.
    By sharon212 in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: December 7th, 12:33 AM
  2. Link Picture boxes to text boxes
    By Paul.McDaid@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 4
    Last Post: November 16th, 11:01 PM
  3. Values in Text Boxes
    By pinball4200 in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: October 13th, 09:07 PM
  4. Make text boxes "forget" values
    By Emil Kvarnhammar in forum ASP.NET General
    Replies: 0
    Last Post: July 16th, 07:53 AM
  5. seperating columns in a text box into multiple text boxes?
    By Greg Doudna in forum Microsoft Access
    Replies: 1
    Last Post: July 9th, 08:12 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139