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  

Combo Box Refresh problem



 
 
Thread Tools Display Modes
  #11  
Old May 20th, 2008, 06:57 PM posted to microsoft.public.access.forms
Pascoe
external usenet poster
 
Posts: 7
Default Combo Box Refresh problem

Yes, I guess it is. Is this wrong? I thought this was how I got the correct
record selected.

What should I be doing?

ruralguy wrote:
So the RecordSource of the form is referencing the ComboBox on your form????

My apologies - brain in neutral.

[quoted text clipped - 6 lines]
Kind Regards,
Russell.



  #12  
Old May 20th, 2008, 07:07 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Combo Box Refresh problem

Try setting the RecordSource of the form to:
SELECT * FROM Addresses

...and then use the ComboBox wizard to create another cbo that will "Find a
record..." for you.

Pascoe wrote:
Yes, I guess it is. Is this wrong? I thought this was how I got the correct
record selected.

What should I be doing?

So the RecordSource of the form is referencing the ComboBox on your form????

[quoted text clipped - 3 lines]
Kind Regards,
Russell.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1

  #13  
Old May 20th, 2008, 07:08 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default Combo Box Refresh problem

I'm going to guess that your problems may be coming from

Addresses.Property

Property is a Reserved Word in Access, and I'm guessing it's confusing the
Access Gnomes. You need to change the field's name to something else,
everywhere it appears. You need to do this even if it's not causing this
particular problem (and it may be) because sooner or later it will trip you
up.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1

  #14  
Old May 20th, 2008, 07:19 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Combo Box Refresh problem

Good catch Linq. I missed that one completely.

Linq Adams wrote:
I'm going to guess that your problems may be coming from

Addresses.Property

Property is a Reserved Word in Access, and I'm guessing it's confusing the
Access Gnomes. You need to change the field's name to something else,
everywhere it appears. You need to do this even if it's not causing this
particular problem (and it may be) because sooner or later it will trip you
up.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1

  #15  
Old May 20th, 2008, 07:27 PM posted to microsoft.public.access.forms
Pascoe
external usenet poster
 
Posts: 7
Default Combo Box Refresh problem

Thank you for your efforts, but unfortunately that doesn't seem to do it!

In fact when I did do this Access only came up with two optinos in the Wizard,
and one of them was not the "Find a record" for you one...!

ruralguy wrote:
Try setting the RecordSource of the form to:
SELECT * FROM Addresses

...and then use the ComboBox wizard to create another cbo that will "Find a
record..." for you.

Yes, I guess it is. Is this wrong? I thought this was how I got the correct
record selected.

[quoted text clipped - 6 lines]
Kind Regards,
Russell.



  #16  
Old May 20th, 2008, 07:36 PM posted to microsoft.public.access.forms
Beetle
external usenet poster
 
Posts: 1,254
Default Combo Box Refresh problem

Nothing wrong with using the combo box value as criteria for your
recordsource, but you're not referencing it correctly. It should be;

SELECT Addresses.* FROM Addresses WHERE [Addresses].[Property]=
Forms!NameOfYourForm![PropertyChoice];

and you'll need to add a Requery to the After Update event of the combo box.


BTW - Linq is right, you should change the name of the Property field. For
more on Access reserved words, see;

http://allenbrowne.com/Ap****ueBadWord.html

--
_________

Sean Bailey


"Pascoe" wrote:

My apologies - brain in neutral.

SELECT Addresses.* FROM Addresses WHERE [Addresses].[Property]=
[PropertyChoice];

ruralguy wrote:
The RecordSource is a form property and not a property of the ComboBox.

I did do the 3rd Option.

[quoted text clipped - 10 lines]
Kind Regards,
Russell.




  #17  
Old May 20th, 2008, 07:48 PM posted to microsoft.public.access.forms
Pascoe
external usenet poster
 
Posts: 7
Default Combo Box Refresh problem

So change all of my tables that use the name Property - bottom line?

Thank you!

Linq Adams wrote:
I'm going to guess that your problems may be coming from

Addresses.Property

Property is a Reserved Word in Access, and I'm guessing it's confusing the
Access Gnomes. You need to change the field's name to something else,
everywhere it appears. You need to do this even if it's not causing this
particular problem (and it may be) because sooner or later it will trip you
up.


  #18  
Old May 20th, 2008, 08:16 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Combo Box Refresh problem

That happens when there is no RecordSource for the form. Create a query then
and bind that to your form.

Pascoe wrote:
Thank you for your efforts, but unfortunately that doesn't seem to do it!

In fact when I did do this Access only came up with two optinos in the Wizard,
and one of them was not the "Find a record" for you one...!

Try setting the RecordSource of the form to:
SELECT * FROM Addresses

[quoted text clipped - 7 lines]
Kind Regards,
Russell.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1

  #19  
Old May 21st, 2008, 10:09 AM posted to microsoft.public.access.forms
Pascoe via AccessMonster.com
external usenet poster
 
Posts: 32
Default Combo Box Refresh problem

BINGO!

I have tinkered with so many parts of this and got so close previousoy
without realising it!

I changed all the field names with "Property" in, to "Property Name" (Thanks
Linq)

I also changed the format of my SQL to what you suggested, and FINALLY it all
works.

I am very very grateful for everyone's input - thank you.

Beetle wrote:
Nothing wrong with using the combo box value as criteria for your
recordsource, but you're not referencing it correctly. It should be;

SELECT Addresses.* FROM Addresses WHERE [Addresses].[Property]=
Forms!NameOfYourForm![PropertyChoice];

and you'll need to add a Requery to the After Update event of the combo box.

BTW - Linq is right, you should change the name of the Property field. For
more on Access reserved words, see;

http://allenbrowne.com/Ap****ueBadWord.html

My apologies - brain in neutral.

[quoted text clipped - 8 lines]
Kind Regards,
Russell.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200805/1

 




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 06:42 PM.


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