Ok, I must be doing something really stupid here and need some help. I'm trying to change a forms RecordSource to match a Reports RecodSource. Basically what I've done is created a print/export routine based off certain critera selected by the user. So, if they want to print a certain report by date, they simply click a dropdown box, select witch report to print and enter the date. Well anyways here the code I'm having trouble with.
Public ExportStr As Variant
ExportStr = Combo41.value
Me.RecordSource = Reports![ExportStr].RecordSource <-The problem code. I think it has to be the formating, i've tried:
Me.RecordSource = Reports!["ExportStr"].RecordSource
Me.RecordSource = "Reports!" & [ExportStr] & ".RecordSource"
Me.RecordSource = Reports!ExportStr.RecordSource
Me.RecordSource = Reports!['ExportStr'].RecordSource
Me.RecordSource = Reports!"ExportStr".RecordSource
I could go on with even some more bizzar varitions. I'm somewhat new at this, but never had so much trouble with simple formating, so if someone has any ideas or could at least point me in the right direction I'd very much appreciate it.
Thanks
Dodge
Public ExportStr As Variant
ExportStr = Combo41.value
Me.RecordSource = Reports![ExportStr].RecordSource <-The problem code. I think it has to be the formating, i've tried:
Me.RecordSource = Reports!["ExportStr"].RecordSource
Me.RecordSource = "Reports!" & [ExportStr] & ".RecordSource"
Me.RecordSource = Reports!ExportStr.RecordSource
Me.RecordSource = Reports!['ExportStr'].RecordSource
Me.RecordSource = Reports!"ExportStr".RecordSource
I could go on with even some more bizzar varitions. I'm somewhat new at this, but never had so much trouble with simple formating, so if someone has any ideas or could at least point me in the right direction I'd very much appreciate it.
Thanks
Dodge