Hello:
I'd like some assistance with passing a value from a form's UNBOUND textbox into a report. Please see attached ACCDB containing the following:
For purpose of this question, key field is [T100_ACRONYMS].[SOURCE]
Also, I have a query, form, and report associated with table [T100_ACRONYMS]
Process:
- Upon opening the ACCDB, form "F100_ACRONYMS" opens.
- Unbound textbox "txtCountListbox" (labeled "All Records") shows value of "7" (i.e., total # of records in the table).
- Now, in the yellow unbound textbox (labeled "Search by keyword..."), type in, e.g., "ABC" (i.e., one of the [SOURCE] values).
- At this point, ubound textbox "txtCountListbox" (now labeled "Matching Records") is updated and shows a value of "3".
... so far so good.
Next:
- Click on command button "View Report".
- Ignore the error dialogue box "Me"... this is what I'm trying to solve right now.
- Here, in the report header, I have an unbound text box which currently shows all table's records (i.e., "7").
- Instead, however, I want to show "3" (remember, when typing source = "ABC", that's the total count matching that source value).
My question:
- Based on the form's unbound textbox "txtCountListbox", how can I pass the active value of, e.g., "3" (for "ABC") or "2" (for "DEF") from the form to the report?
I tried to use =DCount("*","T100_ACRONYMS","SOURCE=" & [Me].[txtSOURCE])... but again, that results in the "Me" error upon opening the report.