I have a split DB that contains a table for each user in the backend. The frontend contains code in a module that grabs the network ID of the user:
Function ap_GetUserName() As Variant
Dim strUserName As String
Dim lngLength As Long
Dim lngResult As Long
strUserName = String$(255, 0)
lngLength = 255
lngResult = wu_GetUserName(strUserName, lngLength)
ap_GetUserName = Left(strUserName, InStr(1,strUserName, Chr(0)) - 1)
strUserName = ap_GetUserName
End Function
I was told that I can create a QueryDef from code so that without altering the form on the frontend, it will save the data entered on the form to the corresponding user's table in the backend based on the network ID function. The form the data is input on is called "frmEntry". The corresponding table for my network ID is tblRDL with my network ID being RDL. Does anyone know how to do this? Thanks in advance. I'm still learning what a QueryDef is.
Function ap_GetUserName() As Variant
Dim strUserName As String
Dim lngLength As Long
Dim lngResult As Long
strUserName = String$(255, 0)
lngLength = 255
lngResult = wu_GetUserName(strUserName, lngLength)
ap_GetUserName = Left(strUserName, InStr(1,strUserName, Chr(0)) - 1)
strUserName = ap_GetUserName
End Function
I was told that I can create a QueryDef from code so that without altering the form on the frontend, it will save the data entered on the form to the corresponding user's table in the backend based on the network ID function. The form the data is input on is called "frmEntry". The corresponding table for my network ID is tblRDL with my network ID being RDL. Does anyone know how to do this? Thanks in advance. I'm still learning what a QueryDef is.