Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find Record Issue (WIN XP/Access 97)

    I have a simple form - I have added a button Find Record using the wizard (probably my first mistake !).

    The code it generated is:
    Screen.PreviousControl.SetFocus
    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

    When I open the form (I have Data Entry property set to Yes) and insert the cursor into any field, then
    click the Find Record Button, I get the error message:
    You can't use Find or Replce now -
    Fields have no data or
    There are no fields to search

    I presume that the line: Screen.PreviousControl.SetFocus is where the problem is at, due to the fact
    that when a form is opened in Data Entry view there technically isn't a "Previous Control".
    (Am I on the right track?)

    When I set the data entry property to No, the Find Record works fine.

    What tweak to the generated code can I use in order to keep the Data Entry property for the form?

    Thank you in advance,
    Michael Abrams

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Find Record Issue (WIN XP/Access 97)

    Your request doesn't really make sense. DataEntry mode means that you don't see any existing records, so what purpose would a Find serve in that mode?
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find Record Issue (WIN XP/Access 97)

    Hi Charlotte,

    I guess our Governor's losing all of his propositions has taken a toll on me.

    Your reply naturally prompted me to go a different route. I set DataEntry to No and on
    Form Open I go to a new record. Achieves the same goal (The user sees a clean record when the databsse opens)

    Problem solved.

    Thank you Charlotte for your assistance.

    From Sacramento,
    Michael Abrams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •