Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

single form to perform add,mod,view--not working????

Status
Not open for further replies.

vinanti

Programmer
Mar 7, 2003
26
IN
hi,

I am working on a form which gives the user various options like:add,modify,view etc..
Now when the user clicks on the modify button another form opens which takes a value from the user for supplier name and i want to open the previous form(that is the master form) for further modification operations based on the choice made by the user.
When i make a separate form the same thing works absolutely fine but since i am using the same form the entire code is being executed but the result not achieved. i mean all the records from the underlying table are shown and the query is not executed.
I have used openform in the calling form:
I tried apply filter in the base form
the problem is that in the form load event i want to give conditions like if openargs="modify".....
if openargs="view"....
but nothing works out together...

i am getting wild at it.

could anybody plz. help

thnks in advance,
vinanti

 
Hi vinanti!

For me the easiest way to handle this would be to start at a menu form and allow options to add view or modify. In the button to add:

DoCmd.OpenForm "YourForm", , , , acFormAdd

To view:

DoCmd.OpenForm "YourForm", , , , acFormReadOnly

To modify you will need to go through a second form which allows the user to enter the supplier and click a button to continue:

In the menu form:

DoCmd.OpenForm "YourSecondForm"

Behind the command button in then second form:

DoCmd.OpenForm "YourForm", , , "Supplier = '" & Me!YourTextBox.Value & "'"

hth


Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top