A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problem forcing users to use a certain combobox first



 
 
Thread Tools Display Modes
  #1  
Old March 16th, 2010, 02:38 AM posted to microsoft.public.access.forms
Kc-Mass
external usenet poster
 
Posts: 362
Default Problem forcing users to use a certain combobox first

Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a user
has to do is select the employee from a combo box whereupon the form fills
in with the current data. There are then 6 unbound combo boxes that
manipulate the current data by offering new selections and then in the
afterupdate event filling in fields through the application of formulas and
data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants to
create a new record and once it does the employee cant' be selected util the
unwanted record is saved which I don't want to do - its trash.. I tried
intercepting the other combos in their before update, onclick and gotfocus
events but I get a strange error message of "The expression On Got Focus you
entered as the event property setting produced the following error:
Procedure declaration does not match description of event or procedure
having the same name." It then goes on to say that there may be a missing
reference or mispelled procedure name. Access created all the procedure
names and there are no missing references.

I've thought of simply hiding the other combos until they pick an employee
but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas


  #2  
Old March 16th, 2010, 03:11 AM posted to microsoft.public.access.forms
Larry Linson
external usenet poster
 
Posts: 3,112
Default Problem forcing users to use a certain combobox first

Define the Enabled property of the controls on the Form to No/False. Set
them to Yes/True only when the user has chosen an employee (check in the
After Update event of the Combo). There's nothing goofy about that. Or,
alternatively, have a form on which the only Control is a Combo to select an
employee, and use it with DoCmd.OpenForm with a WhereCondition to open the
form for Editing the Employee... use LimitToList on that original Combo, and
verify that there was a record in the Load event of the Form for editing.

Larry Linson
Microsoft Office Access MVP

"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a
user has to do is select the employee from a combo box whereupon the form
fills in with the current data. There are then 6 unbound combo boxes that
manipulate the current data by offering new selections and then in the
afterupdate event filling in fields through the application of formulas
and data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants to
create a new record and once it does the employee cant' be selected util
the unwanted record is saved which I don't want to do - its trash.. I
tried intercepting the other combos in their before update, onclick and
gotfocus events but I get a strange error message of "The expression On
Got Focus you entered as the event property setting produced the following
error: Procedure declaration does not match description of event or
procedure having the same name." It then goes on to say that there may be
a missing reference or mispelled procedure name. Access created all the
procedure names and there are no missing references.

I've thought of simply hiding the other combos until they pick an employee
but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas




  #3  
Old March 16th, 2010, 03:41 AM posted to microsoft.public.access.forms
Kc-Mass
external usenet poster
 
Posts: 362
Default Problem forcing users to use a certain combobox first

Thanks Larry

Kevin


"Larry Linson" wrote in message
...
Define the Enabled property of the controls on the Form to No/False. Set
them to Yes/True only when the user has chosen an employee (check in the
After Update event of the Combo). There's nothing goofy about that. Or,
alternatively, have a form on which the only Control is a Combo to select
an employee, and use it with DoCmd.OpenForm with a WhereCondition to open
the form for Editing the Employee... use LimitToList on that original
Combo, and verify that there was a record in the Load event of the Form
for editing.

Larry Linson
Microsoft Office Access MVP

"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a
user has to do is select the employee from a combo box whereupon the form
fills in with the current data. There are then 6 unbound combo boxes
that manipulate the current data by offering new selections and then in
the afterupdate event filling in fields through the application of
formulas and data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants
to create a new record and once it does the employee cant' be selected
util the unwanted record is saved which I don't want to do - its trash..
I tried intercepting the other combos in their before update, onclick and
gotfocus events but I get a strange error message of "The expression On
Got Focus you entered as the event property setting produced the
following error: Procedure declaration does not match description of
event or procedure having the same name." It then goes on to say that
there may be a missing reference or mispelled procedure name. Access
created all the procedure names and there are no missing references.

I've thought of simply hiding the other combos until they pick an
employee but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas






  #4  
Old March 16th, 2010, 03:52 AM posted to microsoft.public.access.forms
Kc-Mass
external usenet poster
 
Posts: 362
Default Problem forcing users to use a certain combobox first

Larry

I put code in the on open event of the form to switch the othercombo boxes
enabled property to "No". - Me.cboJobType.Enabled = False.

I get the same error I expressed before but now it references the on open
event.

Ideas
"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a
user has to do is select the employee from a combo box whereupon the form
fills in with the current data. There are then 6 unbound combo boxes that
manipulate the current data by offering new selections and then in the
afterupdate event filling in fields through the application of formulas
and data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants to
create a new record and once it does the employee cant' be selected util
the unwanted record is saved which I don't want to do - its trash.. I
tried intercepting the other combos in their before update, onclick and
gotfocus events but I get a strange error message of "The expression On
Got Focus you entered as the event property setting produced the following
error: Procedure declaration does not match description of event or
procedure having the same name." It then goes on to say that there may be
a missing reference or mispelled procedure name. Access created all the
procedure names and there are no missing references.

I've thought of simply hiding the other combos until they pick an employee
but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas



  #5  
Old March 16th, 2010, 06:00 AM posted to microsoft.public.access.forms
Larry Linson
external usenet poster
 
Posts: 3,112
Default Problem forcing users to use a certain combobox first

Controls have not been created at Open time so you cannot set them. You need
to use the Load event, as I think I said in my earlier post. But my
suggestion was to _define_ those combo boxes as "Enabled: No", then in the
After Update of the Employee Select Combo, verify that a record was chosen,
and, if so, set each of them Enabled.

Larry Linson
Microsoft Office Access MVP


"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Larry

I put code in the on open event of the form to switch the othercombo boxes
enabled property to "No". - Me.cboJobType.Enabled = False.

I get the same error I expressed before but now it references the on open
event.

Ideas
"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a
user has to do is select the employee from a combo box whereupon the form
fills in with the current data. There are then 6 unbound combo boxes
that manipulate the current data by offering new selections and then in
the afterupdate event filling in fields through the application of
formulas and data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants
to create a new record and once it does the employee cant' be selected
util the unwanted record is saved which I don't want to do - its trash..
I tried intercepting the other combos in their before update, onclick and
gotfocus events but I get a strange error message of "The expression On
Got Focus you entered as the event property setting produced the
following error: Procedure declaration does not match description of
event or procedure having the same name." It then goes on to say that
there may be a missing reference or mispelled procedure name. Access
created all the procedure names and there are no missing references.

I've thought of simply hiding the other combos until they pick an
employee but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas






  #6  
Old March 16th, 2010, 04:34 PM posted to microsoft.public.access.forms
Kc-Mass
external usenet poster
 
Posts: 362
Default Problem forcing users to use a certain combobox first

Hi Larry

I rebuilt the form from scratch and now everything works. I guess there was
some sort of corruption??

Kevin

"Larry Linson" wrote in message
...
Controls have not been created at Open time so you cannot set them. You
need to use the Load event, as I think I said in my earlier post. But my
suggestion was to _define_ those combo boxes as "Enabled: No", then in the
After Update of the Employee Select Combo, verify that a record was
chosen, and, if so, set each of them Enabled.

Larry Linson
Microsoft Office Access MVP


"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Larry

I put code in the on open event of the form to switch the othercombo
boxes enabled property to "No". - Me.cboJobType.Enabled = False.

I get the same error I expressed before but now it references the on open
event.

Ideas
"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a
user has to do is select the employee from a combo box whereupon the
form fills in with the current data. There are then 6 unbound combo
boxes that manipulate the current data by offering new selections and
then in the afterupdate event filling in fields through the application
of formulas and data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants
to create a new record and once it does the employee cant' be selected
util the unwanted record is saved which I don't want to do - its trash..
I tried intercepting the other combos in their before update, onclick
and gotfocus events but I get a strange error message of "The expression
On Got Focus you entered as the event property setting produced the
following error: Procedure declaration does not match description of
event or procedure having the same name." It then goes on to say that
there may be a missing reference or mispelled procedure name. Access
created all the procedure names and there are no missing references.

I've thought of simply hiding the other combos until they pick an
employee but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas








  #7  
Old March 28th, 2010, 11:26 PM posted to microsoft.public.access.forms
Larry Linson
external usenet poster
 
Posts: 3,112
Default Problem forcing users to use a certain combobox first

Yes, that seems probable. I'm glad you solved the problem.

Larry Linson
Microsoft Office Access MVP

"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi Larry

I rebuilt the form from scratch and now everything works. I guess there
was some sort of corruption??

Kevin

"Larry Linson" wrote in message
...
Controls have not been created at Open time so you cannot set them. You
need to use the Load event, as I think I said in my earlier post. But my
suggestion was to _define_ those combo boxes as "Enabled: No", then in
the After Update of the Employee Select Combo, verify that a record was
chosen, and, if so, set each of them Enabled.

Larry Linson
Microsoft Office Access MVP


"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Larry

I put code in the on open event of the form to switch the othercombo
boxes enabled property to "No". - Me.cboJobType.Enabled = False.

I get the same error I expressed before but now it references the on
open event.

Ideas
"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Hi

I have a form designed to allow the manipulation of employee data
(assignments types, commission types and levels etc. The first thing a
user has to do is select the employee from a combo box whereupon the
form fills in with the current data. There are then 6 unbound combo
boxes that manipulate the current data by offering new selections and
then in the afterupdate event filling in fields through the application
of formulas and data transfers to the bound fields.

The problem is that when the user does not first select an employee but
instead starts with the field options in the other combos, access wants
to create a new record and once it does the employee cant' be selected
util the unwanted record is saved which I don't want to do - its
trash.. I tried intercepting the other combos in their before update,
onclick and gotfocus events but I get a strange error message of "The
expression On Got Focus you entered as the event property setting
produced the following error: Procedure declaration does not match
description of event or procedure having the same name." It then goes
on to say that there may be a missing reference or mispelled procedure
name. Access created all the procedure names and there are no missing
references.

I've thought of simply hiding the other combos until they pick an
employee but that seems a little goofy.

Any ideas or smart options?

Thanks

Kevin

Any ideas











 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.