Sorry to take so long in replying.
To answer your request for more information ...
In the sample database, the macro sends the focus to the CompanyName
control; you obviously have changed that setup to be a control named
LastName?
Yes, that is correct.
============================
Describe for us the table and its structure and data that you're using as
the form's recordsource. What are the fields? What are their formats/sizes?
Is the Lookup tab showing something other than Text Box (open the table in
design view, select a field, and click on the Lookup tab at the bottom of
the window)?
PK: ID (autonumber)
The rest are Text datatypes left at default of 255: LastName, TitlePrefix,
TitleSuffix, FirstName, MiddleInitialName, NickName, Organization, Address,
City, State, ZipCode, and Email.
All are set to "TextBox".
==============================
Also describe for us how you've changed the form from what is in the sample
database. What controls are on the form? What is the form's
recordsource?
What I've changed is that the intent of the form is to display by Email
Address vice the contacts phone number. The buttons in the Option Group
still point to the first letter of the LastName field. The form's record
source is "tblAddressList" and the control sources are: "Organization",
"LastName", "FirstName", and "Email".
The macro was copied 'as-is'; all I changed was reference to the record
source - LastName.
====================================================
Your subsequent post suggests that the LastName control is actually
displaying an "ID" (primary key in the table?). Are you using a lookup field
in the table for the LastName data?
No look up fields.
TIA,
Mike
Ken Snell said:
I'm guessing that you have a problem with the data and/or how you set up the
form. I don't believe that the error is the macro itself.
In the sample database, the macro sends the focus to the CompanyName
control; you obviously have changed that setup to be a control named
LastName?
Describe for us the table and its structure and data that you're using as
the form's recordsource. What are the fields? What are their formats/sizes?
Is the Lookup tab showing something other than Text Box (open the table in
design view, select a field, and click on the Lookup tab at the bottom of
the window)?
Also describe for us how you've changed the form from what is in the sample
database. What controls are on the form? What is the form's recordsource?
Your subsequent post suggests that the LastName control is actually
displaying an "ID" (primary key in the table?). Are you using a lookup field
in the table for the LastName data?
--
Ken Snell
<MS ACCESS MVP>
Mike Webb said:
It appears to be this line:
Condition: [CurrentRecord]>0
Action: GoToControl
Comment: If records are returned for the selected letter, go to the
LastName control.
Control Name: LastName
Tried to duplicate it just now and got just the "Type Mis-match" error;
couldn't "force" it to produce the Action Failed dialog box I have been
getting. The contents of that were:
Macro Name: macroContact_Email_List.Alpha Buttons
Condition: True: [CurrentRecord] > 0
Action Name: GoToControl
Arguments: LastName
Mike
On which macro line are you getting this error? Can you give us a
bit
more
info?
--
Ken Snell
<MS ACCESS MVP>
Using Access 2K2; experience level: beginner
============================================
I get a "Type Mis-Match" error when I press any of the option group
buttons.
(I am virtually copying the Customer Phone List form and macro
from
the
Northwinds sample database).
I'm at a loss on what to check. My record source is a single table.
I've
looked at everything for something to 'jump out at me', but no
luck. Any ideas on what I should be looking for?
(I am getting the filtered results, as I want, but would like to stop
this
error from popping up before I deploy the FE to the users.)
TIA,
Mike Webb
Platte River Whooping Crane Maintenance Trust, Inc.
a non-profit 501(c)(3) organization