Hi,
I created a control to open a search form based on a search using the following criteria:
To open the form I use the event
DoCmd.OpenForm "Search User", acViewNormal, acEdit
The form itself has the sql query:
SELECT [Contacts Temp].PIDMs, [Contacts Temp].PIDM, [Contacts Temp].GWBMAIL_ID, [Contacts Temp].LAST_NAME, [Contacts Temp].FIRST_NAME, [Contacts Temp].MI, [Contacts Temp].COMPANY, [Contacts Temp].ATYP_CODE, [Contacts Temp].STREET_LINE1, [Contacts Temp].STREET_LINE2, [Contacts Temp].STREET_LINE3, [Contacts Temp].CITY, [Contacts Temp].STAT_CODE, [Contacts Temp].ZIP, [Contacts Temp].NATN_CODE, [Contacts Temp].EMAIL, [Contacts Temp].USER, [Contacts Temp].CREATE_DATE, [Contacts Temp].GWBMAIL_SOURCE
FROM [Contacts Temp]
WHERE ((([Contacts Temp].LAST_NAME) Like [Enter Last Name - Full, Partial or Blank] & "*" AND (([Contacts Temp].FIRST_NAME) Like [Enter First Name - Full, Partial or Blank] & "*")
ORDER BY [Contacts Temp].LAST_NAME;
I need a way to have a msgbox display, close the form, and reopen the original form if the form opens without records.
Thanks
I created a control to open a search form based on a search using the following criteria:
To open the form I use the event
DoCmd.OpenForm "Search User", acViewNormal, acEdit
The form itself has the sql query:
SELECT [Contacts Temp].PIDMs, [Contacts Temp].PIDM, [Contacts Temp].GWBMAIL_ID, [Contacts Temp].LAST_NAME, [Contacts Temp].FIRST_NAME, [Contacts Temp].MI, [Contacts Temp].COMPANY, [Contacts Temp].ATYP_CODE, [Contacts Temp].STREET_LINE1, [Contacts Temp].STREET_LINE2, [Contacts Temp].STREET_LINE3, [Contacts Temp].CITY, [Contacts Temp].STAT_CODE, [Contacts Temp].ZIP, [Contacts Temp].NATN_CODE, [Contacts Temp].EMAIL, [Contacts Temp].USER, [Contacts Temp].CREATE_DATE, [Contacts Temp].GWBMAIL_SOURCE
FROM [Contacts Temp]
WHERE ((([Contacts Temp].LAST_NAME) Like [Enter Last Name - Full, Partial or Blank] & "*" AND (([Contacts Temp].FIRST_NAME) Like [Enter First Name - Full, Partial or Blank] & "*")
ORDER BY [Contacts Temp].LAST_NAME;
I need a way to have a msgbox display, close the form, and reopen the original form if the form opens without records.
Thanks