I am new to data connections, and while it is working, it's not behaving as I expected.
I have a form where the user enters an Order Number, and based on that value, I retrieve the Product Code, Lot Number and Product Description. I have established a data connection to an i5 server. I used the Micorsoft Query Wizard to generate the query. The query retireves the data based on the Order Number entered by the user.
The problem is that the query runs as soon as they press the Enter key. I want them to have to click a command button, where I can prompt them if the data is correct. If not, I can clear the fields so they may retry.
The other problem is that the user is prompted for a username and password. I understand that I can run a query with VBA (including the User ID and password), but if I do that, do I need the existing data connection?
I have a form where the user enters an Order Number, and based on that value, I retrieve the Product Code, Lot Number and Product Description. I have established a data connection to an i5 server. I used the Micorsoft Query Wizard to generate the query. The query retireves the data based on the Order Number entered by the user.
Code:
Select MOMAST.ORDNO, MOMAST.FITEM, MOMAST.REFNO, MOMAST.FDESC
From GNPGVL.AMFLIBB.MOMAST MOMAST
Where (MOMAST.ORDNO=?)
Order by MOMAST.ORDNO
The problem is that the query runs as soon as they press the Enter key. I want them to have to click a command button, where I can prompt them if the data is correct. If not, I can clear the fields so they may retry.
The other problem is that the user is prompted for a username and password. I understand that I can run a query with VBA (including the User ID and password), but if I do that, do I need the existing data connection?