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  

dropdown list cbo to find record



 
 
Thread Tools Display Modes
  #1  
Old January 13th, 2009, 10:49 PM posted to microsoft.public.access.forms
Corrine
external usenet poster
 
Posts: 29
Default dropdown list cbo to find record

I have a form with a dropdown list from which I want to be able to select an
item and have the rest of the form populate additional fields with that
record's information. Preferrably the form will start out blank. Currently it
is automatically populating with the first record and is only letting me use
the navigation buttons (at the bottom of my form) to move from record to
record. The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.
  #2  
Old January 13th, 2009, 11:34 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default dropdown list cbo to find record

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing
in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to select an
item and have the rest of the form populate additional fields with that
record's information. Preferrably the form will start out blank. Currently it
is automatically populating with the first record and is only letting me use
the navigation buttons (at the bottom of my form) to move from record to
record. The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.

  #3  
Old January 14th, 2009, 08:36 PM posted to microsoft.public.access.forms
Tori
external usenet poster
 
Posts: 19
Default dropdown list cbo to find record

Good afternoon.

I am using Access 2003. I have a combo box in a form I want to be able to
use for navigation just like Corrine (it sounds like she and I are working on
very similar forms). I set my Properties control for this data field to
Locked = Yes and Enabled = No. My Form Properties control is set to Allow
Edits = Yes.

My drop down arrow for the combo box does not open to allow me to select a
record. I can only navigate using the navigational buttons on the bottom.

What else could I try?

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing
in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to select an
item and have the rest of the form populate additional fields with that
record's information. Preferrably the form will start out blank. Currently it
is automatically populating with the first record and is only letting me use
the navigation buttons (at the bottom of my form) to move from record to
record. The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.


  #4  
Old January 14th, 2009, 09:00 PM posted to microsoft.public.access.forms
Corrine
external usenet poster
 
Posts: 29
Default dropdown list cbo to find record

Now the dropdown won't open at all.

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing
in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to select an
item and have the rest of the form populate additional fields with that
record's information. Preferrably the form will start out blank. Currently it
is automatically populating with the first record and is only letting me use
the navigation buttons (at the bottom of my form) to move from record to
record. The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.


  #5  
Old January 14th, 2009, 11:10 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default dropdown list cbo to find record

Hi Corrine,

make sure that, for the combo:

Locked -- No (False)
Enabled -- Yes (True)

this is opposite of what it should be for your data controls

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
Now the dropdown won't open at all.

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing
in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to select an
item and have the rest of the form populate additional fields with that
record's information. Preferrably the form will start out blank. Currently it
is automatically populating with the first record and is only letting me use
the navigation buttons (at the bottom of my form) to move from record to
record. The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.

  #6  
Old January 14th, 2009, 11:13 PM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default dropdown list cbo to find record

Hi Tori,

If you can click in the combo and drop the list, then Enabled is Yes
(True) -- if you can't, then the control is probably not Enabled

If you can drop the list but not change the data, then Locked is Yes (True)

The ControlSource (Data tab of Property sheet) for a search combo should
be blank


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Tori wrote:
Good afternoon.

I am using Access 2003. I have a combo box in a form I want to be able to
use for navigation just like Corrine (it sounds like she and I are working on
very similar forms). I set my Properties control for this data field to
Locked = Yes and Enabled = No. My Form Properties control is set to Allow
Edits = Yes.

My drop down arrow for the combo box does not open to allow me to select a
record. I can only navigate using the navigational buttons on the bottom.

What else could I try?

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing
in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to select an
item and have the rest of the form populate additional fields with that
record's information. Preferrably the form will start out blank. Currently it
is automatically populating with the first record and is only letting me use
the navigation buttons (at the bottom of my form) to move from record to
record. The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.

  #7  
Old January 15th, 2009, 09:23 AM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default dropdown list cbo to find record

Corrine and Tori,

oh, hey, I totally forgot about this...

for a form where you do not want to allow changes to the data, make the
form RecordsetType -- Snapshot

that way, you do not have to deal with Locked or Enabled for the
controls -- just leave them set to the defaults

you will be able to change anything that is not bound to the underlying
RecordSource, such as a 'find combo'

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




strive4peace wrote:
Hi Corrine,

make sure that, for the combo:

Locked -- No (False)
Enabled -- Yes (True)

this is opposite of what it should be for your data controls

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
Now the dropdown won't open at all.

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for
editing in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do
this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to
select an item and have the rest of the form populate additional
fields with that record's information. Preferrably the form will
start out blank. Currently it is automatically populating with the
first record and is only letting me use the navigation buttons (at
the bottom of my form) to move from record to record. The dropdown
list will open, but I cannot select anything from the list. This
form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.

  #8  
Old January 15th, 2009, 07:58 PM posted to microsoft.public.access.forms
Tori
external usenet poster
 
Posts: 19
Default dropdown list cbo to find record

Good afternoon.

Okay, I think I am on the right track now - thankyouverymuch. However,
because my customer name is now an unbounded data field, when I scroll
through the database using the navigational buttons, it is not updating the
customer name but it is updating the other fields.

For instance, I select "Atlas" and all the fields populate properly. If I
want to see the record after Atlas and use the navigational buttons, "Atlas"
remains the name in the customer field while all of the other fields continue
to populate properly.

If I use the drop down for my record selection and do not use the
navigational buttons, all the fields are populating properly.

I have a filter for "Open Date." The filter seems to be working properly,
but when I use the navigational buttons, the name is not updating. You
cannot use the drop down for this filter because you do not know what the
next customer record is, which is why you had to use the filter. Did I lose
you?

Any other suggestions?

"strive4peace" wrote:

Corrine and Tori,

oh, hey, I totally forgot about this...

for a form where you do not want to allow changes to the data, make the
form RecordsetType -- Snapshot

that way, you do not have to deal with Locked or Enabled for the
controls -- just leave them set to the defaults

you will be able to change anything that is not bound to the underlying
RecordSource, such as a 'find combo'

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




strive4peace wrote:
Hi Corrine,

make sure that, for the combo:

Locked -- No (False)
Enabled -- Yes (True)

this is opposite of what it should be for your data controls

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
Now the dropdown won't open at all.

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for
editing in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do
this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to
select an item and have the rest of the form populate additional
fields with that record's information. Preferrably the form will
start out blank. Currently it is automatically populating with the
first record and is only letting me use the navigation buttons (at
the bottom of my form) to move from record to record. The dropdown
list will open, but I cannot select anything from the list. This
form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.


  #9  
Old January 15th, 2009, 08:09 PM posted to microsoft.public.access.forms
Corrine
external usenet poster
 
Posts: 29
Default dropdown list cbo to find record

Tried it both ways. Dropdown still won't work.

Also, or in the meantime, how do I get the form to open by default as blank
and not populate until I choose something from the dropdown list?

Thanks for your help!

"strive4peace" wrote:

Corrine and Tori,

oh, hey, I totally forgot about this...

for a form where you do not want to allow changes to the data, make the
form RecordsetType -- Snapshot

that way, you do not have to deal with Locked or Enabled for the
controls -- just leave them set to the defaults

you will be able to change anything that is not bound to the underlying
RecordSource, such as a 'find combo'

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




strive4peace wrote:
Hi Corrine,

make sure that, for the combo:

Locked -- No (False)
Enabled -- Yes (True)

this is opposite of what it should be for your data controls

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
Now the dropdown won't open at all.

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for
editing in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do
this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to
select an item and have the rest of the form populate additional
fields with that record's information. Preferrably the form will
start out blank. Currently it is automatically populating with the
first record and is only letting me use the navigation buttons (at
the bottom of my form) to move from record to record. The dropdown
list will open, but I cannot select anything from the list. This
form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.


  #10  
Old January 16th, 2009, 06:21 AM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default dropdown list cbo to find record

Hi Tori,

"However, because my customer name is now an unbounded data field"

when you make a control to be used as a lookup or a filter, it is not
bound -- and I normally put these in the form header so they are not
confused with data controls.

If Customer Name is a field in your RecordSource, you should have a
bound control to display and edit it.

~~~

for finding records:

Make one or more unbound (no ControlSource) combos on your form (like in
the header). Let the first column be invisible and be the primary key
ID of the RecordSource of your form and then, on its AfterUpdate event...

=FindRecord()

this code goes behind the form:

'~~~~~~~~~~~~~~~~~~~~
Private Function FindRecord()

'if nothing is picked in the active control, exit
If IsNull(Me.ActiveControl) Then Exit Function

'save current record if changes were made
If me.dirty then me.dirty = false

'declare a variable to hold the primary key value to look up
' NOTE: this assumes that the primary key is an autonumber
' or a long integer data type -- if this is not the case,
' modify accordingly
Dim mRecordID As Long

'set value to look up by what is selected
mRecordID = Me.ActiveControl

'clear the choice to find
Me.ActiveControl = Null

'find the first value that matches
Me.RecordsetClone.FindFirst "SomeID = " & mRecordID

'if a matching record was found, then move to it
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If

End Function

'~~~~~~~~~~~~~~~~~~~~
where
- SomeID is the Name of the primary key field, which is in the
RecordSource of the form -- assuming your primary key is a Long Integer
data type (autonumbers are long integers)

Remember that the Rowsource for a combo can come from anywhere -- it can
pull from multiple tables or only use one ... just make sure that the
first column is the primary key ID of the table you want to search (and
that field is part of the RecordSource for the form you are searching).


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Tori wrote:
Good afternoon.

Okay, I think I am on the right track now - thankyouverymuch. However,
because my customer name is now an unbounded data field, when I scroll
through the database using the navigational buttons, it is not updating the
customer name but it is updating the other fields.

For instance, I select "Atlas" and all the fields populate properly. If I
want to see the record after Atlas and use the navigational buttons, "Atlas"
remains the name in the customer field while all of the other fields continue
to populate properly.

If I use the drop down for my record selection and do not use the
navigational buttons, all the fields are populating properly.

I have a filter for "Open Date." The filter seems to be working properly,
but when I use the navigational buttons, the name is not updating. You
cannot use the drop down for this filter because you do not know what the
next customer record is, which is why you had to use the filter. Did I lose
you?

Any other suggestions?

"strive4peace" wrote:

Corrine and Tori,

oh, hey, I totally forgot about this...

for a form where you do not want to allow changes to the data, make the
form RecordsetType -- Snapshot

that way, you do not have to deal with Locked or Enabled for the
controls -- just leave them set to the defaults

you will be able to change anything that is not bound to the underlying
RecordSource, such as a 'find combo'

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




strive4peace wrote:
Hi Corrine,

make sure that, for the combo:

Locked -- No (False)
Enabled -- Yes (True)

this is opposite of what it should be for your data controls

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
Now the dropdown won't open at all.

"strive4peace" wrote:

Hi Corrine,

"The dropdown list will open, but I cannot select anything from the
list. This form needs to be only for running searches, not for
editing in any way."

My guess is that you have the form AllowEdits property set to False

If you want the user to be able to edit the search combo, instead do
this:

for each control, set:
Locked = True
and. optionally,
Enabled = False

and set AllowEdits = True for the form

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
(: have an awesome day
*




Corrine wrote:
I have a form with a dropdown list from which I want to be able to
select an item and have the rest of the form populate additional
fields with that record's information. Preferrably the form will
start out blank. Currently it is automatically populating with the
first record and is only letting me use the navigation buttons (at
the bottom of my form) to move from record to record. The dropdown
list will open, but I cannot select anything from the list. This
form needs to be only for running searches, not for editing in any
way. Suggestions? I'm working in Access '07.

 




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 01:41 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.