Can't Find Forms Error with Macros

G

Guest

When I open my {frmPatient Data} and view the appropriate record, I want to
print the report {rptLetter} based on the current displayed Patient’s record
(exam results), the Patient’s [Exam ID]. As I press the Command Button
“Print Notificationâ€, an error reading message appears: “Microsoft Access
can’t find form ‘frmExam Data’ referred in a macro expression or Visual Basic
Codeâ€. It is referring to: Macro Name: UpdatePrintNotice; Condition:
True; Action Name: SetValue; Arguments: [Forms]![frmExam
Data]![ResultsNotified],Date()

This macro has two actions: 1) is SetValue and the 2nd is OpenReport. The
details for SetValue are above and the details for the action OpenReport:
Report Name: rptLetter; View: Print Preview; Filter Name: blank; Where
Condition: [ExamData].[ExamID]=[Forms]![frmPatient Data]![frmExam
Data]![ExamID]

There are two tables: main table is {PatientData} and subdatasheet is
{ExamData}, with the linked field [SSN], a one to many relationship. The
design of the {frmPatientData} has 3 tabs: Demographics from the table
{PatientData}, and the other two tabs Single Exam and Exam History are from
the table {ExamData}, the [ExamID] is the primary key for the table
{ExamData}. The original problem when I inherited the database, the naming
of the objects were non-distinctive; the tables, queries, forms & reports had
the same names; so I renamed the queries, forms and reports with the
prefixes: qry, frm & rpt; I did not get to the macros nor the tables. I
decided to leave them along for now. I’ve done a Compact and Repair
Database. This error reading is the 1st situation. The 2nd and 3rd are
similar as below. Prior to renaming the objects, the original database had
an existing error when pressing the Command Button: Run-time error 2427.
You entered an expression that has no valueâ€.

There are two other macros which when I try to open them separately, they
both have error readings: Macro 2: “can’t find ‘frmExam Data’ …†and Macro
3: “… can’t find ‘frmPatient Data’…â€

Macro 2 Name: ClearNotified; Condition: True; Action Name: SetValue;
Arguments: [Forms]![frmExamData]![ResultsNotified], Null
Macro 3 Name: ResultsIn=Today; Condition: True; Action Name: SetValue;
Arguments: [Forms]![frmPatient Data]![frmExam Data].[Form]![ResultsIn], Date()

I’m not sure what is causing these errors, and was wondering if someone
could assist me in this.
 
G

Guest

“Microsoft Access can’t find form ‘frmExam Data’ referred in a macro
expression or Visual Basic Codeâ€.

Either the form named "frmExam Data" doesn't exist, or was CLOSED prior to
executing the macro. Any referenced forms MUST BE OPEN when they're
referenced.

Curtis said:
When I open my {frmPatient Data} and view the appropriate record, I want to
print the report {rptLetter} based on the current displayed Patient’s record
(exam results), the Patient’s [Exam ID]. As I press the Command Button
“Print Notificationâ€, an error reading message appears: “Microsoft Access
can’t find form ‘frmExam Data’ referred in a macro expression or Visual Basic
Codeâ€. It is referring to: Macro Name: UpdatePrintNotice; Condition:
True; Action Name: SetValue; Arguments: [Forms]![frmExam
Data]![ResultsNotified],Date()

This macro has two actions: 1) is SetValue and the 2nd is OpenReport. The
details for SetValue are above and the details for the action OpenReport:
Report Name: rptLetter; View: Print Preview; Filter Name: blank; Where
Condition: [ExamData].[ExamID]=[Forms]![frmPatient Data]![frmExam
Data]![ExamID]

There are two tables: main table is {PatientData} and subdatasheet is
{ExamData}, with the linked field [SSN], a one to many relationship. The
design of the {frmPatientData} has 3 tabs: Demographics from the table
{PatientData}, and the other two tabs Single Exam and Exam History are from
the table {ExamData}, the [ExamID] is the primary key for the table
{ExamData}. The original problem when I inherited the database, the naming
of the objects were non-distinctive; the tables, queries, forms & reports had
the same names; so I renamed the queries, forms and reports with the
prefixes: qry, frm & rpt; I did not get to the macros nor the tables. I
decided to leave them along for now. I’ve done a Compact and Repair
Database. This error reading is the 1st situation. The 2nd and 3rd are
similar as below. Prior to renaming the objects, the original database had
an existing error when pressing the Command Button: Run-time error 2427.
You entered an expression that has no valueâ€.

There are two other macros which when I try to open them separately, they
both have error readings: Macro 2: “can’t find ‘frmExam Data’ …†and Macro
3: “… can’t find ‘frmPatient Data’…â€

Macro 2 Name: ClearNotified; Condition: True; Action Name: SetValue;
Arguments: [Forms]![frmExamData]![ResultsNotified], Null
Macro 3 Name: ResultsIn=Today; Condition: True; Action Name: SetValue;
Arguments: [Forms]![frmPatient Data]![frmExam Data].[Form]![ResultsIn], Date()

I’m not sure what is causing these errors, and was wondering if someone
could assist me in this.
 
G

Guest

Dennis: I thank you for responding. I apologize for not replying earlier, I
am new in the Microsoft.com discussion group and didn’t realize I had a
response. After posting this subject and thought no one responded, I went to
another site and was temporarily being helped and we got stuck. The initial
posted error “Can’t find forms….†was clarified as I had forgot to rename the
control {Exam Data} to {frmExam Data}. as both table and form objects had the
same name. Anyway, that initial problem was solved and so I submitted a new
request for the “2427 error†I listed at the end of the 3rd paragraph,
because it was a new issue. We got stuck in the coding. So, I posted the
latest thread in the Discussion Group: Microsoft.Public.Technet, subject:
“Run-Time Error 2427 Codingâ€, dated 5/3/2006, not knowing how to get to the
Public.Access group. If you don’t mind, could you look at that post and see
if there is an easy solution to the coding that we tried to work out? Your
help would be greatly appreciated. Sorry if there is any confusion.

Dennis said:
“Microsoft Access can’t find form ‘frmExam Data’ referred in a macro
expression or Visual Basic Codeâ€.

Either the form named "frmExam Data" doesn't exist, or was CLOSED prior to
executing the macro. Any referenced forms MUST BE OPEN when they're
referenced.

Curtis said:
When I open my {frmPatient Data} and view the appropriate record, I want to
print the report {rptLetter} based on the current displayed Patient’s record
(exam results), the Patient’s [Exam ID]. As I press the Command Button
“Print Notificationâ€, an error reading message appears: “Microsoft Access
can’t find form ‘frmExam Data’ referred in a macro expression or Visual Basic
Codeâ€. It is referring to: Macro Name: UpdatePrintNotice; Condition:
True; Action Name: SetValue; Arguments: [Forms]![frmExam
Data]![ResultsNotified],Date()

This macro has two actions: 1) is SetValue and the 2nd is OpenReport. The
details for SetValue are above and the details for the action OpenReport:
Report Name: rptLetter; View: Print Preview; Filter Name: blank; Where
Condition: [ExamData].[ExamID]=[Forms]![frmPatient Data]![frmExam
Data]![ExamID]

There are two tables: main table is {PatientData} and subdatasheet is
{ExamData}, with the linked field [SSN], a one to many relationship. The
design of the {frmPatientData} has 3 tabs: Demographics from the table
{PatientData}, and the other two tabs Single Exam and Exam History are from
the table {ExamData}, the [ExamID] is the primary key for the table
{ExamData}. The original problem when I inherited the database, the naming
of the objects were non-distinctive; the tables, queries, forms & reports had
the same names; so I renamed the queries, forms and reports with the
prefixes: qry, frm & rpt; I did not get to the macros nor the tables. I
decided to leave them along for now. I’ve done a Compact and Repair
Database. This error reading is the 1st situation. The 2nd and 3rd are
similar as below. Prior to renaming the objects, the original database had
an existing error when pressing the Command Button: Run-time error 2427.
You entered an expression that has no valueâ€.

There are two other macros which when I try to open them separately, they
both have error readings: Macro 2: “can’t find ‘frmExam Data’ …†and Macro
3: “… can’t find ‘frmPatient Data’…â€

Macro 2 Name: ClearNotified; Condition: True; Action Name: SetValue;
Arguments: [Forms]![frmExamData]![ResultsNotified], Null
Macro 3 Name: ResultsIn=Today; Condition: True; Action Name: SetValue;
Arguments: [Forms]![frmPatient Data]![frmExam Data].[Form]![ResultsIn], Date()

I’m not sure what is causing these errors, and was wondering if someone
could assist me in this.
 

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

Top