re-open form in edit mode with query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Please tell me if this is possible. I have a form with 4 buttons. Add,
Update, Query, and Exit. The form originally opens in read-only form. If I
push the Update button it re-opens it in edit form. However, if I use the
query button first and find the record I'm looking for and then push the
update button, it takes me back to the record it opens to begin with and
loses my filtered record. Is there a way that I can make a form go from
read-only to edit withouth closing/re-opening and also keeping the filtered
info? If so, can you please show me in macro, I have a very hard time with
Visual Basic. Thx. :)
 
You don't say how you made the form "read only".

Try changing the form property AllowEdits to
AllowEdits = True
hth
Al Camp
 
Thank you for your response. I beleive they set it up so that the button that
opens the form, opens it read only, and then when you click the update form
it closes the form and re-opens it in edit form, using a macro. Well that's
fine for the first record, but I would like to be able to query and then
update, if necessary. However, when queried it should still remain read-only
until you push the update button. Is there a way that I can change the macro
that is linked to the update button, so that it doesn't need to close the
form first in order to change it from read-only to edit mode? I tried
removing the close part of the macro but then when I click the update button,
it does nothing at all. Please help.
 
It would be helpful to see the code behind the form Open button...
If the form was made "read only", I'm assuming it was done by opening the
form with AllowEdits property of the form set to False. Many programmers do
it that way...

In the code behind your Update button use...
Allow Edits=True

If my assumptions are correct, this will allow editing without closing and
reopening the form... but without more specific info (code) I can't be sure.
hth
Al Camp
 
It worked! Thank you very much for your help. :)

AlCamp said:
It would be helpful to see the code behind the form Open button...
If the form was made "read only", I'm assuming it was done by opening the
form with AllowEdits property of the form set to False. Many programmers do
it that way...

In the code behind your Update button use...
Allow Edits=True

If my assumptions are correct, this will allow editing without closing and
reopening the form... but without more specific info (code) I can't be sure.
hth
Al Camp
 
Back
Top