L
lantel
Guys can anyone help me out with my problem:
Basically I have a form that displays records from a CUSTOMER table
based on this query:
SELECT CUSTOMER.Customer_ID, CUSTOMER.First_Name, CUSTOMER.Last_Name,
CUSTOMER.Phone_Nb, CUSTOMER.House_Nb, CUSTOMER.Apt_Nb, CUSTOMER.Street,
CUSTOMER.City, CUSTOMER.Country, CUSTOMER.Postal_Code,
CUSTOMER.Customer_Info, CUSTOMER.Status, CUSTOMER.Manager_ID
FROM CUSTOMER
WHERE CUSTOMER.Status="p";
Now if I open the form, and there are no records which have their
status fields set to "p", then the form creates a new record in the
customer table.
I want to avoid this. Is there any code I can put in on_current, or
something that when I open the form, and there are no records which
have their status fields to "p" (ie. the query returns 0 records), that
it would simply display a msgbox and quit the form?
I've been trying different things, but can't get anything that works.
Thanks guys,
appreciated.
Basically I have a form that displays records from a CUSTOMER table
based on this query:
SELECT CUSTOMER.Customer_ID, CUSTOMER.First_Name, CUSTOMER.Last_Name,
CUSTOMER.Phone_Nb, CUSTOMER.House_Nb, CUSTOMER.Apt_Nb, CUSTOMER.Street,
CUSTOMER.City, CUSTOMER.Country, CUSTOMER.Postal_Code,
CUSTOMER.Customer_Info, CUSTOMER.Status, CUSTOMER.Manager_ID
FROM CUSTOMER
WHERE CUSTOMER.Status="p";
Now if I open the form, and there are no records which have their
status fields set to "p", then the form creates a new record in the
customer table.
I want to avoid this. Is there any code I can put in on_current, or
something that when I open the form, and there are no records which
have their status fields to "p" (ie. the query returns 0 records), that
it would simply display a msgbox and quit the form?
I've been trying different things, but can't get anything that works.
Thanks guys,
appreciated.