Re: Command Button "Find"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Is it a popup?

Did adding the RunCommand help?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Terressa" <Terressa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:C7E3FF94-4800-49FA-8593-F587AB45EEF2@xxxxxxxxxxxxxxxx
Allen,
Thanks for helping me.

My form is bound to more than one table. It is a split form that has member
information on top (first name, last name, phone...) and a subform on the
bottom that has member's contributions that is bound to a table and/or query.

When I open my church membership database the Main Menu pops up first that
has command buttons on it that goes to my forms/reports.

When I exit out of my Main Menu and open my "Members/Contributions" form
from my Navigation Bar the "Find" button works perfectly, no problems. It is
just when I open "Members/Contributions form from my Main Menu that it will
not work and states "command button is not available".

Thanks,
Terressa


"Allen Browne" wrote:

Okay, perhaps this is an embedded macro in Access 2007.

The On Click property of the button is the right one.
GoToControl handles the Screen.PreviousControl for you.
The error handing for that is good.

Perhaps you could insert a line above all the others that does:
RunCommand SaveRecord
That should give you an error message if the current record can't be saved
for any reason (in which case you can't go to a new record

Can we confirm that this is a form that is bound to some table or query?

Is it a popup form (i.e. you can move it outside the Access window)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Terressa" <Terressa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:563E779A-89AD-45E9-8F1B-B182E86D5F5E@xxxxxxxxxxxxxxxx
> Allen,
> I'm new to posting can you tell? :)
>
> I went to view code on find button and there was no code.
> My "on click" stated this:
> OnError Next
> GoToControl =[Screen].[PreviousControl].[Name]
> ClearMacroError
> RunCommand Find
> [MacroError]<>0 MsgBox =[MacroError].[Description], Yes, None
>
> This is a form that has church members (first name, last name, etc.)
>
> How do you set focus to ScreenPreviousControl?
>
> Sincerely,
> Terressa
>
>
> "Allen Browne" wrote:
>
>> What's in the code behind your command button?
>> And what event did you use? On Click?
>>
>> Is this a bound form? (If not, there's nothing to find.)
>>
>> Did you SetFocus to Screen.PreviousControl?
>> When the button's code runs, it has focus, and it is not bound to a
>> field.
>>
>>
>>
>> "Terressa" <Terressa@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:2E9CC8E2-133B-4B9F-99BB-2E532FABA4FA@xxxxxxxxxxxxxxxx
>> > Hi I have a database that I created a Main Menu to go to my forms,
>> > but when I open the form from my Main Menu my "Find" command
>> > button on my form brings up a dialog box that states
>> > "The command or action isn't available now".
>> >
>> > If I open this same form from the Navigation Bar the "Find" command
>> > button works fine. I don't understand. Can someone help me?




-----------------------------------------------------------------------------
Less Spam Better enjoyable experience
Visit : news://spacesst.com
.



Relevant Pages

  • Re: Command Button "Find"
    ... Did adding the RunCommand help? ... Allen Browne - Microsoft MVP. ... has command buttons on it that goes to my forms/reports. ... When I exit out of my Main Menu and open my "Members/Contributions" form ...
    (microsoft.public.access.forms)
  • Re: Command Button "Find"
    ... The popup form is not. ... Did adding the RunCommand help? ... > When I exit out of my Main Menu and open my "Members/Contributions"> form ... >> Allen Browne - Microsoft MVP. ...
    (microsoft.public.access.forms)
  • Re: Can I still use check boxes?
    ... You'll need to build a filter string that looks like this: ... Dim strTmp As String ... Allen Browne - Microsoft MVP. ... Tips for Access users - http://allenbrowne.com/tips.html ...
    (microsoft.public.access.formscoding)
  • Re: Record Change Confirmation
    ... Allen Browne - Microsoft MVP. ... Tips for Access users - http://allenbrowne.com/tips.html ... Private Sub Form_KeyDown ... In fact I have a book with the bookmark at the error handling chapter. ...
    (microsoft.public.access.formscoding)
  • Re: Record Change Confirmation
    ... Allen Browne - Microsoft MVP. ... Tips for Access users - http://allenbrowne.com/tips.html ... Private Sub Form_KeyDown ... In fact I have a book with the bookmark at the error handling chapter. ...
    (microsoft.public.access.formscoding)