Hello,
I have a form with text/combo boxes that draws from a query and sends records to a report.
The query has the following code in the criteria block of some of the columns:
[Forms]![frmName]![fldName]
This code tells the query to select only those records that match what was entered or selected in the pertinent text/combo box in the "report" form. So...
User Profile
Collapse
-
Select All if Textbox Empty
-
Actually I did download the sample database provided in the link. I wasn't able to get that to work on my db.
No worries though. I got it to work this way....
1. Copy the Row Source from the Listbox Properties.
2. Create a command button.
3. Create an "On Click" Event for that button.
4. Enter the following into the module - listboxName.Row Source = "****Paste... -
The code I showed you was the original. I did change the field name as you suggested, but it doesn't work....Leave a comment:
-
I attempted the code explained, but for some reason it isn't working with my form.
I also tried this, but the listbox goes blank -
Private Sub CmdButtonSortBy Name_Click
Dim strSQL as String
strSQL = me.listbox.rows ource & "ORDER BY FieldName;"
me.listbox.rows ource = strSQL
End Sub
Any reason you can see?Leave a comment:
-
Order Command for Fields in Listbox
Hello,
How should I write an "on click" code for a cmd button to tell a field in a listbox to order itself in ascending? -
Sorry about that. Saw my previous post dropping back in pages quickly and thought it wasn't going to be responded to.
I'm not sure what you meant by accessing the properties across the subforms, but what I have tried to do was to add this to the "On Click" Event of the textbox -
DoCmd.OpenForm "frm1", acViewNormal,,"[YourCommonIDFie ldHere]=" & Me!YourFieldOnS ubFormHere
...Leave a comment:
-
-
subfrm1 textbox "On Click" opens subfrm2 with same record
Hello,
I have a form that has two subforms within it (frm1 - subfrm1, subfrm2)
Does anyone know how I can create an "On Click" event for a textbox -fld1- that is within -subfrm1- (displays records in columnar view -frm2-) which would cause -subfrm2- (displays records in tabular view -frm3-) to display the same record as the value displayed in that textbox -fld1-?
Thanks,
...
No activity results to display
Show More
Leave a comment: