Form Load checking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hum
    New Member
    • Feb 2008
    • 2

    Form Load checking

    Hi,

    I have a MS Access form that is populated from a query executing from the results of another form. What I wish to do is if there are no records returned in the query then the form should not show and I would like to show an error message instead.

    What I am thinking is to have a check in the Form load procedure to determine this, but I do not know how to check how many records there are in the query ... can any one help please ?

    Thanks in advance !
  • lotus18
    Contributor
    • Nov 2007
    • 865

    #2
    Originally posted by Hum
    Hi,

    I have a MS Access form that is populated from a query executing from the results of another form. What I wish to do is if there are no records returned in the query then the form should not show and I would like to show an error message instead.

    What I am thinking is to have a check in the Form load procedure to determine this, but I do not know how to check how many records there are in the query ... can any one help please ?

    Thanks in advance !
    If recordset counts = 0 then display message empty.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      You may find that the "On Load" is not the appropriate event. You might want to check out the other events such as "On Open", "On Query", "On Connect" and so on.

      Comment

      Working...