Re: Error 2465

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If no records match the criteria, then the form *will* open to a new record. You're trying to prevent that?

You could set the form's AllowAdditions property to No. That will stop it opening to a new record. Instead, the entire detail section of the form will go completely blank, as explained here:
http://allenbrowne.com/casu-20.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"PHisaw" <PHisaw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CADB1E80-75E1-4473-92CA-E8A8FCAA96E2@xxxxxxxxxxxxxxxx
Will someone please tell me how to correct this line of code? I've changed
it so many different ways - with and w/out quotes, brackets, parenthesis -
not isnull, is not null, etc. and I get either an error 2465 "can't find
field "|" refered to" or error 13 "type mismatch".

DoCmd.OpenForm "fTTLogOff", acNormal, , "[StopTime]Is Null" And "Not
IsNull[Tech]"

The first part of the code thru "[StopTime]Is Null" was supplied by Allen
Browne and of course works perfectly but I wanted to tack on where Tech is
not null to keep the form from opening with a blank record.

Thanks for any help.
Pam

.



Relevant Pages

  • Re: need help creating criteria for time
    ... Allen Browne - Microsoft MVP. ... I then removed the criteria and left everything else and ran it ... Now let's verify that these date/time fields have *only* date or time, ... If you switch your query to SQL View (View menu, ...
    (microsoft.public.access.queries)
  • Re: need help creating criteria for time
    ... Allen Browne - Microsoft MVP. ... I then removed the criteria and left everything else and ran it ... Now let's verify that these date/time fields have *only* date or time, ... If you switch your query to SQL View (View menu, ...
    (microsoft.public.access.queries)
  • Re: Access Date() & DateAdd functions apparent error in Vista
    ... you might try a compact/repair (Database Utilities on Tools ... Allen Browne - Microsoft MVP. ... This code in both cases was placed inthe criteria grid of the query design ... a calculated field, ...
    (microsoft.public.access.queries)
  • Re: part of multi search query non-functional
    ... solution would be to leave the criteria out of the query, ... Search form - Handle many optional criteria ... Allen Browne - Microsoft MVP. ... Locate the WHERE clause. ...
    (microsoft.public.access.queries)
  • Re: Lost All Forms
    ... Allen Browne - Microsoft MVP. ... That means they may be marked as hidden objects, or the navigation bar may be filtered to exclude those objects. ... Since you can see the names of your forms, you can also try opening one like this: ... If it opens, that may reassure you they are okay. ...
    (microsoft.public.access.forms)