openformwithinput

  • Thread starter Thread starter cronept
  • Start date Start date
C

cronept

I am working on a database which has 2 forms. 1 is a switchboard, the
other is the main form to input the data. I created 3 buttons on the
switchboard with on-click event were set up to "=openformwithinput1()"
and 2,3. 1 is to open the main form by selecting "bidnumber", 2 is to
open main form by selecting "locationNumber", 3 is to open by
selecting "POnumber". I was succeed.

But after i made 3 queries based on the 3 fields: Bidnumber,
Locationnumber and POnumber, The openformwithinput function is not
working anymore. Everytime, I click a button, a new record will be
opened instead of the existing record.
I deleteed the 3 queries, but it is still not working. Please help me.

BTW: I also created some buttons on the main form "save","delete" and
"close" using the command button wizard. I already deleted the
"delete" button because I saw some articles talking about the "delete"
button may cause conflict with openformwithinput().
 
Hi.
Please open your form in Design view, check the form's
property sheet for the property "DataEntry". If it is set
to Yes, you will recieve a new record every time you open
the form, and will not be able to view other records using
it.
You can also override this if, when opening the form, you
use DoCmd.OpenForm strFrmName,,,,acFormEdit.
But i think the most effective way to achive the desired
effect is to also use the form's Where condition to
determine which records you see:
DoCmd.OpenForm strFrmName,,,strLinkCriteria,acFormEdit.
Good Luck,
Ayelet
 
Hi, Ayelet,

Thank you very much. As you said, my form's data entry was set to yes.
No it is no problem. Maybe later I will try the other method you
suggested.

Jin
 
Back
Top