Hi,
I have a subform that I would like to set the Object Source based on what user is in the database. I have a backend DB that contains tables that store data for all the users. The frontend points to the correct user's table based on a function that grabs their network ID. I have a subform on the form they use to enter data that will display what they have entered previously. Is there a way to make the object source of the subform dependent on what user is in the DB? I tried this:
Dim vTableName
vTableName = "tbl" & ap_GetUserName
Me.SourceObject = vTableName
It doesn't work.
ap_GetUserName is the function that grabs the network ID. All tables on the backend are named by tbl+networkID.
Does anyone know how to accomplish this?
I have a subform that I would like to set the Object Source based on what user is in the database. I have a backend DB that contains tables that store data for all the users. The frontend points to the correct user's table based on a function that grabs their network ID. I have a subform on the form they use to enter data that will display what they have entered previously. Is there a way to make the object source of the subform dependent on what user is in the DB? I tried this:
Dim vTableName
vTableName = "tbl" & ap_GetUserName
Me.SourceObject = vTableName
It doesn't work.
ap_GetUserName is the function that grabs the network ID. All tables on the backend are named by tbl+networkID.
Does anyone know how to accomplish this?