Change in query

A

Anna

Hi: Can any one please help me in the query. In where clause i want to
check if main form is tbl_PPVResearch then it match the condition. If
main form is tbl_PPVResearch_edit then it match the condition. Problem
is i have two forms. One for data entry and the other form editing. So
only thing i need in here when the main form is tbl_PPVResearch this
query is ok but when the main form is tbl_PPVResearch_eidt then the
query will be (WHERE
[tbl_Events].[ticketnum]=[Forms]![tbl_PPVResearch_edit]![ticketnum]).
When i open the main form tbl_PPVResearch_edit it prompt me for the
ticket number because its trying to search the ticketNum in
tbl_PPVResearch which is now not the main form.


SELECT [tbl_Events].[PPVVOD_Outlet] FROM tbl_Events WHERE
[tbl_Events].[ticketnum]=[Forms]![tbl_PPVResearch]![ticketnum];

Thanks.
 
Top