Re: Default values in queries



Ian

Queries are ... SQL statements. An alternative to running a query is
running a procedure with the SQL statement in it. Note that you can modify
the SQL string to include the fields and values you now use field defaults
to set.

Another approach might be to create functions that "gather" that information
from the form's fields, and use those functions to come up with the query's
field values. An example might be (untested aircode):

Function ThisUser() as String
ThisUser = Forms!YourFormName!YourUserField
End Function

--
Regards

Jeff Boyce
<Office/Access MVP>

"NoviceIan" <NoviceIan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2F55177B-823D-4EDA-8C11-ABD109433F18@xxxxxxxxxxxxxxxx
> Hi,
>
> We have a staff database with primitive user level security which
basically
> consists of several fields that default to the user's initials and stamp
the
> time that the record was created/updated.
>
> This works fine for us using forms however when records are updated using
> queries we do not currently capture this information. How can we
configure
> the queries to capture this information?
>
> Ian

.



Relevant Pages

  • Re: Simplest way to run 2 queries invoked by a form?
    ... >User needs to be able to enter 2 items of data onto a form and press a ... >1) do i put the sql statements into individual queries? ... What do the two queries DO? ... Using unbound controls and code to update ...
    (microsoft.public.access.forms)
  • Re: User queries and security
    ... I make queries read only to a chosen user group (as defined by access ... I have most of my forms based on SQL statements in the record source ... everything under the bonnet from them and apply your security by ...
    (comp.databases.ms-access)
  • Re: Simplest way to run 2 queries invoked by a form?
    ... What do the two queries DO? ... So 2 SQL statements are required. ... > can set its Limit to List property to True, and the user won't be ABLE ... > contains only valid entries. ...
    (microsoft.public.access.forms)
  • User queries and security
    ... I make queries read only to a chosen user group (as defined by access ... I have most of my forms based on SQL statements in the record source ... My plan for users needing reports is to create a search form using ...
    (comp.databases.ms-access)
  • Re: Username and Usergroup
    ... the intent of the capture of the user name and group at login. ... >> You have a valid point about the security permissions for running ... Jokobe didn't ask how to control these ... >> more flexibility than just the ability to limit who runs which queries ...
    (microsoft.public.access.formscoding)