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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Brain Freeze help with combobox and query



 
 
Thread Tools Display Modes
  #1  
Old March 9th, 2010, 12:10 AM posted to microsoft.public.access.queries
Kc-Mass
external usenet poster
 
Posts: 362
Default Brain Freeze help with combobox and query

Hi,

I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.

Any help appreciated.

Kevin


  #2  
Old March 9th, 2010, 12:58 AM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Brain Freeze help with combobox and query

kc-mass wrote:
I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.


The Change event is inapproprate. You should use the
AfterUpdate event instead.

Me is not allowed outside of a class module, use the full
reference:
=Forms![form name].[cboEmployee] Or Is Null

--
Marsh
MVP [MS Access]
  #3  
Old March 9th, 2010, 01:19 AM posted to microsoft.public.access.queries
Kc-Mass
external usenet poster
 
Posts: 362
Default Brain Freeze help with combobox and query

Thanks Marshal but the form still does not refresh the data. It opens to
the first record and stays there no matter how many times i select something
from the combobox.

Further ideas appreciated. Driving me nuts.

Kevin


"Marshall Barton" wrote in message
...
kc-mass wrote:
I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The
first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.


The Change event is inapproprate. You should use the
AfterUpdate event instead.

Me is not allowed outside of a class module, use the full
reference:
=Forms![form name].[cboEmployee] Or Is Null

--
Marsh
MVP [MS Access]



  #4  
Old March 9th, 2010, 02:57 AM posted to microsoft.public.access.queries
Kc-Mass
external usenet poster
 
Posts: 362
Default Brain Freeze help with combobox and query

I just now had the afterupdate event do a debug.print of the cboemployee.
It prints out what appear to be ordinals showing the position of the
currently selected record. To check further I had it assign set a textbox
to be equal to the cboemployee. that shows a legitimate employeeID.

Any ideas???

Kevin


"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Thanks Marshal but the form still does not refresh the data. It opens to
the first record and stays there no matter how many times i select
something from the combobox.

Further ideas appreciated. Driving me nuts.

Kevin


"Marshall Barton" wrote in message
...
kc-mass wrote:
I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The
first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against
the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.


The Change event is inapproprate. You should use the
AfterUpdate event instead.

Me is not allowed outside of a class module, use the full
reference:
=Forms![form name].[cboEmployee] Or Is Null

--
Marsh
MVP [MS Access]





  #5  
Old March 9th, 2010, 03:18 AM posted to microsoft.public.access.queries
Kc-Mass
external usenet poster
 
Posts: 362
Default Brain Freeze help with combobox and query

Problem solved rebuilt form from scratch and works fine seems some level of
corruption.

Thanks


"kc-mass" connearney_AT_comcast_DOT_net wrote in message
...
Thanks Marshal but the form still does not refresh the data. It opens to
the first record and stays there no matter how many times i select
something from the combobox.

Further ideas appreciated. Driving me nuts.

Kevin


"Marshall Barton" wrote in message
...
kc-mass wrote:
I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The
first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against
the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.


The Change event is inapproprate. You should use the
AfterUpdate event instead.

Me is not allowed outside of a class module, use the full
reference:
=Forms![form name].[cboEmployee] Or Is Null

--
Marsh
MVP [MS Access]





  #6  
Old March 9th, 2010, 05:34 AM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Brain Freeze help with combobox and query

Well, I am sure glad that you solved it because corruption
symptoms rarely relate to the real problem. We would have
been chasing all over the place trying to pin down the
inconsistent bahavior caused by any kind of corruption.
--
Marsh
MVP [MS Access]


kc-mass wrote:
Problem solved rebuilt form from scratch and works fine seems some level of
corruption.


"kc-mass" connearney_AT_comcast_DOT_net wrote
Thanks Marshal but the form still does not refresh the data. It opens to
the first record and stays there no matter how many times i select
something from the combobox.

Further ideas appreciated. Driving me nuts.


"Marshall Barton" wrote
kc-mass wrote:
I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The
first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against
the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.

The Change event is inapproprate. You should use the
AfterUpdate event instead.

Me is not allowed outside of a class module, use the full
reference:
=Forms![form name].[cboEmployee] Or Is Null

  #7  
Old March 9th, 2010, 10:31 AM posted to microsoft.public.access.queries
vernal
external usenet poster
 
Posts: 1
Default Brain Freeze help with combobox and query

i also have a similar problem ......................
have got a drop down list in excel say A, B, C, D, data..now this data has
got various other sub data to it.. i wan get this sub - data in the excel
format in such a way that if i click A i should only get that sub data for A
only and not for some thing else....so in the same cell if i clear the data A
to B i should get the list for only data B in the next cell
please help
m breaking my head over it

"kc-mass" wrote:

Hi,

I have a personnel form with typical personnel data. On the form is an
combo that has a data source of employeeID, LastName, First name. The first
(0) column is bound to the combo.

The query that feeds the form references the combo as criteria against the
employeeID.
=[ME].[cboEmployee] Or Is Null

The onchange event of the combo asks for a requery of the form

Private Sub cboEmployee_Change()
Requery
Debug.Print "it fired"
End Sub

The event fires but the form does not requery.

Any help appreciated.

Kevin


.

  #8  
Old March 9th, 2010, 03:59 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Brain Freeze help with combobox and query

vernal wrote:
i also have a similar problem ......................
have got a drop down list in excel say A, B, C, D, data..now this data has
got various other sub data to it.. i wan get this sub - data in the excel
format in such a way that if i click A i should only get that sub data for A
only and not for some thing else....so in the same cell if i clear the data A
to B i should get the list for only data B in the next cell


If you are asking a question about something in MS Access,
you should translate it to what you are using in an Access
form.

If you are asking an Excel question, then you should post it
to an appropriate Excel forum.

--
Marsh
MVP [MS Access]
 




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:00 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.