M
Maury Markowitz
I use a number of temp tables where the "proper record" to display for any
particular user is the one with their name on it. For instance, there might
be 10 people editing trades, but each one has their own record with their own
name. TO get their name, I use a COM object.
Right now I am programmatically setting the recordsource when the open the
form. This is annoying though, I'd rather do it in the property sheet. But I
can't figure out how!
I tried putting this into the Server Filter property:
"modifiedBy=" & getLoggedInUserId() & "'"
But that says "getLoggedInUserId is not a recognized function". I then
changed the function to set a global var and tried this:
"modifiedBy=" & loggedInUserId & "'"
That gets me a "invalid SQL statement".
So then I tried putting this into the recordsource:
SELECT * FROM tblTempCashflowTrades WHERE modifiedBy= @getLoggedInUserId()
and then suddenly this appears in the Input Parameters property:
? = getLoggedInUserId
I don't know what that means, but I am assuming the ? means there's some
sort of syntax error. When I run this a dialog appears asking for the value
of getLoggedInUserId.
Ok, what's the secret here? The dox are useless. My only concern is that the
filter take place server-side in the SQL, not after downloading a potentially
huge table and then doing the filter locally.
Maury
particular user is the one with their name on it. For instance, there might
be 10 people editing trades, but each one has their own record with their own
name. TO get their name, I use a COM object.
Right now I am programmatically setting the recordsource when the open the
form. This is annoying though, I'd rather do it in the property sheet. But I
can't figure out how!
I tried putting this into the Server Filter property:
"modifiedBy=" & getLoggedInUserId() & "'"
But that says "getLoggedInUserId is not a recognized function". I then
changed the function to set a global var and tried this:
"modifiedBy=" & loggedInUserId & "'"
That gets me a "invalid SQL statement".
So then I tried putting this into the recordsource:
SELECT * FROM tblTempCashflowTrades WHERE modifiedBy= @getLoggedInUserId()
and then suddenly this appears in the Input Parameters property:
? = getLoggedInUserId
I don't know what that means, but I am assuming the ? means there's some
sort of syntax error. When I run this a dialog appears asking for the value
of getLoggedInUserId.
Ok, what's the secret here? The dox are useless. My only concern is that the
filter take place server-side in the SQL, not after downloading a potentially
huge table and then doing the filter locally.
Maury