tags:

views:

120

answers:

2

Hi

I migrated a database from access 2003 to access 2007. It seems to work but when I clicked the buttons from A-Z I'm getting this error message: "Microsoft office can't find the object 'A_Z Schaltfläche' If 'A_Z Schaltfläche is a new macro or macro group, make sure you have saved it and that you have typed it's name correctly"

I didn't make a new macro but I deleted a word in one of the tables which I think causes the problem: "Like [Formulare]![Frm_Fahrzeugdaten]![Schaltflächenkriterium]"

I found it under the "Record Source" and under one field, that expression is written in the criteria field. If I don't delete this I'm getting a box which says: "Enter Parameter Value" Formulare!Frm_Fahrzeugdaten!Schaltflächenkriterium

My skills in VBA is not really so good, and I need some help how to correct the problem

Thanks for your help.

=======

additional info's: When I open the VBA code under the Form_Fahrzeugen, here is what I saw:

Private Sub Auswahl_Click()
    On Error GoTo Auswahl_Click_Err

    ' Programmablauf
    Me.Filter = "[A_Fahrzeugtyp] like '*'"
    Me.Namen_Filter.Value = 27
    Me.Schaltflächenkriterium = "*"
    Schaltflächenkriterium = "*"
    Me.Requery
    Me.lfd_Name.Requery
    DoCmd.GoToRecord acDataForm, "Frm_Fahrzeugdaten", acGoTo, 1
    Me.lfd_Name.Selected(1) = True
    Me.A_Inventarnummer.SetFocus

    GoTo Auswahl_Click_End

Auswahl_Click_Err:
    Call ErrorHandler("Form_Frm_Fahrzeugdaten", "Auswahl_Click", Error$, Err, Erl)
    Resume Next

Auswahl_Click_End:
    'Ausführungen vor den verlassen der Routine

End Sub

Does it have something to do with the macro name? This is the macro name by the way: "A_Z Schaltfläche" If I go to the design view of "A_Z Schaltfläche" this is what I got, the conditions are marked yellow I'm not really sure if this is a good sign though:

Thanks

==============

Updates about my problem:

I was able to find the solution of my problem. It was the version of my microsoft office which was causing it. The original database was written in German and when I did the migration, I migrated it to the english version of Access 2007. The reason why it can't find the object because of the name "Ereignisprozedur" in German and "Event procedure" in English. I changed it to Event Procedure because the error says: "Microsoft Office Access can't find the object "Ereignisprozedur" If Ereignisprozedur is a new macro or macro group, make sure you have saved it and that you have typed its name correctly Access was unable to locate the macro or VBA function. If you are trying to call a macro, make sure that the name of the macro and the name of the macro group are spelled correctly. If you are trying to call a user-defined VBA function, be sure to use the following syntax: =FunctionName() or =FunctionName(argument1,argument2,...) Make sure that the function is either: Defined in the code for the form or report. - or - A public function that is in a module (not a class module)."

And the word "Formulare" to Forms. Then the program works.

I can't understand why microsoft programs are language independent???

+1  A: 

Do you mean you deleted a word in one of the Queries? What it is is a reference to a form called Frm_Fahrzeugdaten and a control (field, column) called Schaltflächenkriterium. It is under criteria, so the query is saying:

Select such and such where this field (column) is Like this form and this control

It is usual to have

 Like "*" & [Formulare]![Frm_Fahrzeugdaten]![Schaltflächenkriterium] & "*"

Or

 Like  [Formulare]![Frm_Fahrzeugdaten]![Schaltflächenkriterium] & "*"

That is, with wild cards (*)

Remou
@Remou: No I deleted it from this form: "Frm_Fahrzeugdaten". I opened it in "Design View" and "Data" and in "Record Source" there is a name: "Abf_Fahrzeugdaten" I clicked on the "..." button not on the drop down which leads me to the Query Tools Design. Here there is a table "Tbl_Fahrzeuge" and of the field names are: "A_Fahrzeugtyp" and under criteria, I deleted the whole thing: "Like [Formulare]![Frm_Fahrzeugdaten]![Schaltflächenkriterium]"
tintincute
This is type of query. For what reason did you delete the criteria?
Remou
If I didn't delete it the form didn't work well. It pop-ups a window asking for a parameter which shouldn't be.
tintincute
You need to correct it, not delete it. Have you removed or renamed a control on the form called Schaltflächenkriterium?
Remou
@Remou: No I didn't removed nor renamed a control on the form. I don't have a form called "Schaltflächenkriterium".
tintincute
The form is not called Schaltflächenkriterium, it is called Frm_Fahrzeugdaten and at one stage it must have had a control called Schaltflächenkriterium, or the whole thing would not have worked.
Remou
ok, I still can't figure out how to solve it? I think the 2007 access didn't do the conversion very well that's why it's getting an error. Any suggestions?Thanks
tintincute
Does the version before the conversion work correctly? Does the version after the conversion but before you made any changes only say Enter Parameter Value, and does it work if you enter a value (A, for example)? Have you tried adding a textbox to Frm_Fahrzeugdaten called Schaltflächenkriterium?
Remou
StackOverflow is not always ideal for these kinds of "question and answer" back and forth, you might like to try a more conventional forum, rather than a repository such as this. You can usually find me at http://forum.lessthandot.com, but there are other forums.
Remou
ok thanks Remou:-)
tintincute
+1  A: 

[Schaltflächenkriterium] seems to me to be the name of an edit control (textbox) in form [Frm_Fahrzeugdaten] for the user to filter a record set.

If you deleted the textbox control, just re-insert it and name it correctly.

devio
@devio: where should I re-insert it?
tintincute