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  

how to requery on new record continuous form



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 08:48 PM posted to microsoft.public.access.forms
osupratt via AccessMonster.com
external usenet poster
 
Posts: 7
Default how to requery on new record continuous form

I have a form that we input Vendor insurance information. My corporation has
7 companies. Each of the 7 companies has their own Vendor list. I have a
combo box named Vendor whose record source is a query from a UNION query. So
in this UNION query I have all 7 company's Vendors pulling on one query. From
this query I have another query which filters for a specific company Vendor
list....In the criteria of column 'company' I have [company code?].

On a continuous form I have the combo box Vendor. The end-user clicks on this
combo box and a filter box opens asking for [company code?]. The end-user
might type 'BAS'. The query works to only show the Vendors for company BAS.
This works fine; however on the continuous form the next record being entered
might not be for company BAS. The combo box is still only showing for company
BAS. How do I get the combo box to requery on a new record being added?

Thanks.

--
Message posted via http://www.accessmonster.com

  #2  
Old April 27th, 2010, 09:00 PM posted to microsoft.public.access.forms
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default how to requery on new record continuous form

The problem is that on a continuous Form, there is really only *one* combo
box - displayed many times. If you change its properties (its RowSource in
this case), all rows reflect that change.

One somewhat snarky but effective getaround is to put a Textbox onto the
form, carefully superimposed over the text area of the combo box (don't
cover the dropdown tool though). Set its Control Source to either a DLookUp
expression looking up the current record's value from the lookup table, or
(if practical) base the Form on a query joined to the lookup table and
simply make it a bound textbox.

Set the textbox's Enabled = No, Locked = Yes, Tab Stop = No so the user
can't do anything with it; it's for display only. You may need to move it in
front of the combo box (with Move To Front on the Format menu).

When the user selects the dropdown, the combo box data will come in front
and allow (filtered) selection; when it's not selected, the user will see
the textbox.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"osupratt via AccessMonster.com" u41837@uwe wrote in message
news:a72bccde4cef9@uwe...
I have a form that we input Vendor insurance information. My corporation
has
7 companies. Each of the 7 companies has their own Vendor list. I have a
combo box named Vendor whose record source is a query from a UNION query.
So
in this UNION query I have all 7 company's Vendors pulling on one query.
From
this query I have another query which filters for a specific company
Vendor
list....In the criteria of column 'company' I have [company code?].

On a continuous form I have the combo box Vendor. The end-user clicks on
this
combo box and a filter box opens asking for [company code?]. The end-user
might type 'BAS'. The query works to only show the Vendors for company
BAS.
This works fine; however on the continuous form the next record being
entered
might not be for company BAS. The combo box is still only showing for
company
BAS. How do I get the combo box to requery on a new record being added?

Thanks.

--
Message posted via http://www.accessmonster.com



 




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 12:03 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.