1. Is there a way to detect if any user is currently viewing a record? Currently, I'm using an extra field (LockedBy) which is populated when the user opens a record; I have record level locking set for edited records, but it doesn't seem to work as my form is based on a query that retrieves one record at a time from the main table.
2. I'm using the following code to evaluate a date field in a query by form:
If Not IsNull(txtRequestDate) Then
If Left(Me![txtRequestDate], 1) = "*" Or Right(Me![txtRequestDate], 1) = "*" Then
where = where & " AND [RequestDate] like '" + Me![txtRequestDate] + "'"
where = where & " AND [RequestDate] = #" + Me![txtRequestDate] + "#"
This works quite well, but it isn't terribly flexible. For example, the user has to specify 2 digits in the day/month parts, and 4 digits in the year part, eg - */05/2003* works, while */05/03* and */5/2003* do not work. Note that wildcards have been placed at the end of each example because the RequestDate field is a General Date showing both date and time. Can anyone help me make this a bit more flexible?