Access a button from anther form

  • Thread starter Thread starter Abs
  • Start date Start date
Hi,

I have two forms which are View and Edit. The first form displays all
records in a table and second uses to edit record which includes Add, Save
and Delete buttons. If user does not find the record on the View form, he has
to add the new record on the Edit form. Now, switch forms will take time if
there are lots of records to add. I would like to create a button on the View
form called New, When user clicks on the New button, the new record form
with the current record number will be displayed, (just like the user clicks
on Edit form/Add button. How can I write code for New button? Thanks
 
If you have a form that work for edits - use that form

in the New Button onclick event

'add

DoCmd.OpenForm "YourEditForm", acAdd

Althoug - for a new Record there should be NO current recordnumber if there
is - then it's not really a new record just edit it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top