After all that I realized I had the solution in another part of my code.
.Selected = True doesn't work but setting the listbox equal to the specific item's list index does work.
Me.lstFlightLegs = Me.lstFlightLegs.ItemData(intLegNumber)
I have an unbound listbox on a subform. The Row Source is a table and it is filtered using the Criteria of one of the fields based on a textbox on the subform.
By clicking on a button on the subform, an item from a combobox on the subform is added to the table the Row Source of the listbox is...
I had some other problems with my previous solution because of timing. I've totally abandoned the subreport idea. It's been a bit of a pain but it works. I've just grouped the different sections using the Tag of the controls and set visibility based on that.
I never thought the Load Event...
I have found a way for it to work but I have to set a Record Source for the subreport which is tblSpecificFlightData. I created two textboxes with almost identical Elookup() calls in the Control Sources.
txtA.ControlSource = Elookup("expr", "domain", "criteria = " & txtFlightLegID)...
Here is the pared down database. The code for the report is the same with the same table. I've removed some of the fields that used queries because it was too much to include and it doesn't really matter.
Click the Open Report button on frmHome. This opens the report in Print Preview with the...
I have replicated mr. arnelgp's code exactly and yet for some reason, his works but mine does not. I'm trying to upload a copy of mine but I'm having a hard time getting it small enough. Thanks for the continued help. I'll get mine uploaded as soon as possible.
This forum sure does autologoff quick. Lost my last reply.
I have narrowed the problem with your help. It's in the subreports. I placed two textboxes directly on the report. The first is filled via an Elookup call in the code. The second has the Control Source of the textbox = Elookup().
When...
JHB - I've tried printing multiple ways and the result is always the same. I initially was creating the report in Print Preview mode and then just printing from there and also creating a PDF from there - no data.
I've now tried printing from a button (DoCmd.PrintOut). Same result.
arnelgp - I...
MS Access 2007
Report is created via a button. The report contains the same subreport repeated 8 times. This is done mainly for simplicity of looping in the code. There are no master-child links.
All the data in the report is via Elookup calls in the Load_Event of the report. The report does...