masterdineen
New member
- Local time
- Today, 02:58
- Joined
- Jul 25, 2012
- Messages
- 9
Hello there.
I want to open a form and change the Record Source via a dynamic variable.
When I go back into the FrmStats form and have a look at the RecordSource property, I can see that it has not changed.
Can someone point me in the right direction please. This doesn't seem like a hard task.
Regards
Rob
I want to open a form and change the Record Source via a dynamic variable.
Code:
Dim Table as String
Table = "Statistics"+replace(Environ("Username"),".","")
DoCmd.OpenForm "FrmStats", acNormal, , , , acHidden
Form!FrmStats.RecordSource = Table
DoCmd.Close acForm, "FrmStats", acSaveYes
Can someone point me in the right direction please. This doesn't seem like a hard task.
Regards
Rob