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  

as field is selected from combo drop down eliminate it from the li



 
 
Thread Tools Display Modes
  #11  
Old September 28th, 2009, 02:31 PM posted to microsoft.public.access.forms
Kelly
external usenet poster
 
Posts: 469
Default as field is selected from combo drop down eliminate it from th

Yes, that is when is tells me it's not available. I also tried the following

Private Sub NumberOfConductors_AfterUpdate()
DoCmd.Requery
End Sub

This worked but bounced the cursor back to the first field in the datasheet
subform. Why wouldn't this just go to the next tab?

Kelly


"KARL DEWEY" wrote:

Did you try the macro action Requery without argument?
--
Build a little, test a little.


"Kelly" wrote:

The macro I had to associate it with a table, query .... that is the reason I
put all those other things in there. If I just use requery for the action and
the control name is NumberOfConductors it tells me it's unavailable. Real
confusing. As you can tell not sure of what I am doing. But I did use

Private Sub NumberOfConductors_AfterUpdate()
DoCmd.GoToRecord , , acNext
DoCmd.GoToRecord , , acPrevious
End Sub

It bounces back to the record but it did update the PercentageOfFill. So
thanks for that idea.

Kelly


"KARL DEWEY" wrote:

Then made the macro use open query, save, repaintobject and close
Huh? Did you try just putting the one action in the marco - Requery -
without arguments?

--
Build a little, test a little.


"Kelly" wrote:


Karl,
I tried what you suggested placing the where in the SQL for that combo box.
Then made the macro use open query, save, repaintobject and close but all it
does is blink the query but still they all stay in the list.

Kelly


"KARL DEWEY" wrote:

I like to use macros. Create a macro and use action Refresh and save.
Open the form in design view, click on the combo, double click, scroll down
and select Properties. Scroll to the After Update property. Click the pull
down and select the above macro. Save.

--
Build a little, test a little.


"Kelly" wrote:


How do I do that?
Kelly


"KARL DEWEY" wrote:

You will need a refresh event after selection.
--
Build a little, test a little.


"Kelly" wrote:

Karl,
Thanks for the reply. I tried your suggestion but it still shows the ones
you have selected from the drop down as an option. The Combo is CircNameID in
the CircuitDetail table and is looking up the selection listed below. What am
I missing?

SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE (((CircuitsData.CircID) Not In (SELECT [CircuitDetail].[CircNameID]
FROM [CircuitDetail])))
ORDER BY CircuitsData.FromEquip;

Kelly


"KARL DEWEY" wrote:

You might add criteria to the source like this --
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE CircuitsData.CircID Not In (SELECT [YourBoundTable].[YourBoundField]
FROM [YourBoundTable])
ORDER BY CircuitsData.FromEquip;

--
Build a little, test a little.


"Kelly" wrote:

Is it possible to have a combo look up in a form that when you click the
dropdown arrow and select one of the records from the list it will take it
out of the dropdown for the next selection? And if by chance they deleted
that selection from that entry it will go back to the list to be selected
again on the next mainform entry?

EXAMPLE:
my subform has a combo box CircNameID

RowSource:
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip FROM CircuitsData ORDER BY
CircuitsData.FromEquip;

The heading is Circuit Name

Kelly

  #12  
Old October 8th, 2009, 04:30 PM posted to microsoft.public.access.forms
Kelly
external usenet poster
 
Posts: 469
Default as field is selected from combo drop down eliminate it from th

Karl I tried a different approach and it did eleiminate the ones out of the
dropdown but blanked out the others that were in the report. Instead of using
the lookup (CircNameID) to the table with the data I used the table with the
data. If that makes sense.
This worked but blanked out the fields that were already selected in the
CircNameID field in the subreport.

SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE (((CircuitsData.CircID) Not In (Select CircuitsData.CircID from
CircuitSubformqry where CircuitsData.CircID = CircuitSubformqry.CircID )))
ORDER BY CircuitsData.FromEquip;

The field CircNameID was originally

SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
ORDER BY CircuitsData.FromEquip;

The Name and Control source is CircNameID in table CircuitDetail. What am I
missing or am I totally confused? any suggestions are greatly appreciated.

Kelly


"KARL DEWEY" wrote:

You might add criteria to the source like this --
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE CircuitsData.CircID Not In (SELECT [YourBoundTable].[YourBoundField]
FROM [YourBoundTable])
ORDER BY CircuitsData.FromEquip;

--
Build a little, test a little.


"Kelly" wrote:

Is it possible to have a combo look up in a form that when you click the
dropdown arrow and select one of the records from the list it will take it
out of the dropdown for the next selection? And if by chance they deleted
that selection from that entry it will go back to the list to be selected
again on the next mainform entry?

EXAMPLE:
my subform has a combo box CircNameID

RowSource:
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip FROM CircuitsData ORDER BY
CircuitsData.FromEquip;

The heading is Circuit Name

Kelly

  #13  
Old October 8th, 2009, 04:56 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default as field is selected from combo drop down eliminate it from th

I see error in your subquery. You can not Select CircuitsData.CircID from
CircuitSubformqry.
Either this ---
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE (((CircuitsData.CircID) Not In (Select CircuitSubformqry.CircID from
CircuitSubformqry where CircuitsData.CircID = CircuitSubformqry.CircID )))
ORDER BY CircuitsData.FromEquip;

Or this ---
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE (((CircuitsData.CircID) Not In (Select [MyAlias].CircID from
CircuitsData AS [MyAlias] WHERE CircuitsData.CircID = [MyAlias].CircID )))
ORDER BY CircuitsData.FromEquip;

--
Build a little, test a little.


"Kelly" wrote:

Karl I tried a different approach and it did eleiminate the ones out of the
dropdown but blanked out the others that were in the report. Instead of using
the lookup (CircNameID) to the table with the data I used the table with the
data. If that makes sense.
This worked but blanked out the fields that were already selected in the
CircNameID field in the subreport.

SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE (((CircuitsData.CircID) Not In (Select CircuitsData.CircID from
CircuitSubformqry where CircuitsData.CircID = CircuitSubformqry.CircID )))
ORDER BY CircuitsData.FromEquip;

The field CircNameID was originally

SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
ORDER BY CircuitsData.FromEquip;

The Name and Control source is CircNameID in table CircuitDetail. What am I
missing or am I totally confused? any suggestions are greatly appreciated.

Kelly


"KARL DEWEY" wrote:

You might add criteria to the source like this --
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip
FROM CircuitsData
WHERE CircuitsData.CircID Not In (SELECT [YourBoundTable].[YourBoundField]
FROM [YourBoundTable])
ORDER BY CircuitsData.FromEquip;

--
Build a little, test a little.


"Kelly" wrote:

Is it possible to have a combo look up in a form that when you click the
dropdown arrow and select one of the records from the list it will take it
out of the dropdown for the next selection? And if by chance they deleted
that selection from that entry it will go back to the list to be selected
again on the next mainform entry?

EXAMPLE:
my subform has a combo box CircNameID

RowSource:
SELECT CircuitsData.CircID, CircuitsData.CircuitName,
CircuitsData.FromEquip, CircuitsData.ToEquip FROM CircuitsData ORDER BY
CircuitsData.FromEquip;

The heading is Circuit Name

Kelly

 




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