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  

Conditional Combo Box



 
 
Thread Tools Display Modes
  #1  
Old March 11th, 2010, 07:25 PM posted to microsoft.public.access.forms
meesh
external usenet poster
 
Posts: 9
Default Conditional Combo Box

One last question for the day! I am trying to create conditional combo boxes
for the first time and I think I have the basics but something in the
execution went wrong. I currently have two columns DeviceID and Portname.
The idea is that when you select the device ID, it will fill the portname
combo with available ports on that device. We do have a table where we are
inputting both device name and portname. DeviceID is importing the deviceID
numbers from the Device table (where we are obviously inputting the devices
and other information about the devices).
Here is the setup:
DeviceID and PortName are both Combo boxes.
DeviceID is bound to a column from the Device table.
Set up a query for portname, it is querying the current table (ports) for
Portname and has the following criteria:
[Forms]![frmTestingAGAIN]![DeviceID]. Somehow altogether to row source looks
like:
SELECT Ports.PortName FROM Ports WHERE
(((Ports.PortName)=[Forms]![frmTestingAGAIN]![DeviceID]));
DeviceID has the following query: SELECT Devices.ID, Devices.DeviceName FROM
Devices ORDER BY Devices.[ID];
DeviceID also has a macro set up on AfterEvent which may or may not be set
up correctly as well. But it has requery selected and under argument is says
Portname.
Back in form view: I select a device id from the list, and then I get a
popup:
Enter Parameter Value
Forms!frmTestingAGAIN!DeviceID
(text box)

Any way to fix this?? I appreciate anyone and everyone’s help.

  #2  
Old March 11th, 2010, 07:48 PM posted to microsoft.public.access.forms
TekWarrior
external usenet poster
 
Posts: 10
Default Conditional Combo Box

Your underlying query is asking for the 'Text Box' Object named "DeviceID" on
your "frmTestingAGAIN" form.

Is the form "frmTestingAGAIN" open when your running this 'Combo Box'
"lookup"?

Does the the DeviceID field 'Text Box' have the Object name "DeviceID"?


--

Thanks,
Tek


"Meesh" wrote:

One last question for the day! I am trying to create conditional combo boxes
for the first time and I think I have the basics but something in the
execution went wrong. I currently have two columns DeviceID and Portname.
The idea is that when you select the device ID, it will fill the portname
combo with available ports on that device. We do have a table where we are
inputting both device name and portname. DeviceID is importing the deviceID
numbers from the Device table (where we are obviously inputting the devices
and other information about the devices).
Here is the setup:
DeviceID and PortName are both Combo boxes.
DeviceID is bound to a column from the Device table.
Set up a query for portname, it is querying the current table (ports) for
Portname and has the following criteria:
[Forms]![frmTestingAGAIN]![DeviceID]. Somehow altogether to row source looks
like:
SELECT Ports.PortName FROM Ports WHERE
(((Ports.PortName)=[Forms]![frmTestingAGAIN]![DeviceID]));
DeviceID has the following query: SELECT Devices.ID, Devices.DeviceName FROM
Devices ORDER BY Devices.[ID];
DeviceID also has a macro set up on AfterEvent which may or may not be set
up correctly as well. But it has requery selected and under argument is says
Portname.
Back in form view: I select a device id from the list, and then I get a
popup:
Enter Parameter Value
Forms!frmTestingAGAIN!DeviceID
(text box)

Any way to fix this?? I appreciate anyone and everyone’s help.

  #3  
Old March 11th, 2010, 09:53 PM posted to microsoft.public.access.forms
meesh
external usenet poster
 
Posts: 9
Default Conditional Combo Box

I'm not sure I am understanding what you are asking so please bear with my
ignorance. I can tell you the purpose of what I'm doing. I have a table
that has both deviceID and Portname. The deviceID information is being
pulled from the Device table. The whole idea is that I select the deviceID
and all the ports associated with that device are available for selection in
the combo box for Portname.

This is going to be a big table thanks to switches and all that....

However! I just made a slight change (removed frm from the form name) and I
no longer get the Parameter Value message, but I instead what happens is:

The device IDs are there. But when I select the device ID it is selected
all PORTS with the same "ID" number. (ie.... Device 3 is switch b. But we
also have 3 switches that have a 3 thanks to)(what I'm trying to do is enter
this information so that each switch and port constitutes a primary key, or
something along those lines, a unique row id)

"TekWarrior" wrote:

Your underlying query is asking for the 'Text Box' Object named "DeviceID" on
your "frmTestingAGAIN" form.

Is the form "frmTestingAGAIN" open when your running this 'Combo Box'
"lookup"?

Does the the DeviceID field 'Text Box' have the Object name "DeviceID"?


--

Thanks,
Tek


"Meesh" wrote:

One last question for the day! I am trying to create conditional combo boxes
for the first time and I think I have the basics but something in the
execution went wrong. I currently have two columns DeviceID and Portname.
The idea is that when you select the device ID, it will fill the portname
combo with available ports on that device. We do have a table where we are
inputting both device name and portname. DeviceID is importing the deviceID
numbers from the Device table (where we are obviously inputting the devices
and other information about the devices).
Here is the setup:
DeviceID and PortName are both Combo boxes.
DeviceID is bound to a column from the Device table.
Set up a query for portname, it is querying the current table (ports) for
Portname and has the following criteria:
[Forms]![frmTestingAGAIN]![DeviceID]. Somehow altogether to row source looks
like:
SELECT Ports.PortName FROM Ports WHERE
(((Ports.PortName)=[Forms]![frmTestingAGAIN]![DeviceID]));
DeviceID has the following query: SELECT Devices.ID, Devices.DeviceName FROM
Devices ORDER BY Devices.[ID];
DeviceID also has a macro set up on AfterEvent which may or may not be set
up correctly as well. But it has requery selected and under argument is says
Portname.
Back in form view: I select a device id from the list, and then I get a
popup:
Enter Parameter Value
Forms!frmTestingAGAIN!DeviceID
(text box)

Any way to fix this?? I appreciate anyone and everyone’s help.

  #4  
Old March 11th, 2010, 11:16 PM posted to microsoft.public.access.forms
TekWarrior
external usenet poster
 
Posts: 10
Default Conditional Combo Box

The issue I see, which I gleen from the other post I saw of yours too.

Based on the fact you have multiple devices connecting to one another, but
only one of each port number available you have what appears to be a complex
issue, but is actually really simple. Unlike what was pointed out by another
user on the other thread you don’t need three tables (though in their defense
a many to many ratio almost always calls for one, and the fact you have many
ports also is why the third table).

The reason I’m suggesting this way is your experience level in programming
Access, otherwise I would recommend the method the other user was talking
about, but it would take a lot more programming learning curve and for that
you need to read or take classes.

As is this will take some digging in and learning Access VBA a lot more.

I will use limited number for the sake of the example.

Example:
You have available 3 ports on any given device (low number I know), and you
have 100 devices you need to match up where each device only connects to one
other device on a given port (I'm making some assumptions here).

Table: Devices
DeviceID: Autonumber (Primary Key Field)
Device Name: Text Field (Indexed: Yes (No Duplicates)) - hostname?
UDP Port 1: Text (Default Value: “UDP Port 1”)
UDP Port 1 Device Connection: Number (Indexed: Yes (No Duplicates)) “Device
Connect Field”
TCP Port 1: Text (Default Value: “TCP Port 1”)
TCP Port 1 Device Connection: Number (Indexed: Yes (No Duplicates))
UDP Port 2: Text (Default Value: “UDP Port 2”)
UDP Port 2 Device Connection: Number (Indexed: Yes (No Duplicates))
You get the idea I hope… all through your TCP and UDP ports you need to track.
(Other Fields)
This table contains all your devices you need to track
100 records

The first part is easy you make a query for each Port field (the device
connect ones) that lookup all the Devices that includes both their Name and
ID. If that device is already used on that port (You should filter out your
current device).

The nature of having the “Device Connect Fields” Indexed: Yes (No
Duplicates), will prevent you from using the same device on the same port for
more then one other device.

Here is where it starts to get even trickier and where I don’t have time to
fully explain it, so crack those books a little to answer some of these
questions so you can get more up to speed and understand the basics first
(you have to walk before you can run).

You need to program it so that after you update the record it updates the
other devices record.

I would do this by creating a temporary over writable table with all the
needed info, again I won’t go into this too deep, but that should put you in
the right direction.

Hope that helps...

--

Thanks,
Tek


"Meesh" wrote:

I'm not sure I am understanding what you are asking so please bear with my
ignorance. I can tell you the purpose of what I'm doing. I have a table
that has both deviceID and Portname. The deviceID information is being
pulled from the Device table. The whole idea is that I select the deviceID
and all the ports associated with that device are available for selection in
the combo box for Portname.

This is going to be a big table thanks to switches and all that....

However! I just made a slight change (removed frm from the form name) and I
no longer get the Parameter Value message, but I instead what happens is:

The device IDs are there. But when I select the device ID it is selected
all PORTS with the same "ID" number. (ie.... Device 3 is switch b. But we
also have 3 switches that have a 3 thanks to)(what I'm trying to do is enter
this information so that each switch and port constitutes a primary key, or
something along those lines, a unique row id)

"TekWarrior" wrote:

Your underlying query is asking for the 'Text Box' Object named "DeviceID" on
your "frmTestingAGAIN" form.

Is the form "frmTestingAGAIN" open when your running this 'Combo Box'
"lookup"?

Does the the DeviceID field 'Text Box' have the Object name "DeviceID"?


--

Thanks,
Tek


"Meesh" wrote:

One last question for the day! I am trying to create conditional combo boxes
for the first time and I think I have the basics but something in the
execution went wrong. I currently have two columns DeviceID and Portname.
The idea is that when you select the device ID, it will fill the portname
combo with available ports on that device. We do have a table where we are
inputting both device name and portname. DeviceID is importing the deviceID
numbers from the Device table (where we are obviously inputting the devices
and other information about the devices).
Here is the setup:
DeviceID and PortName are both Combo boxes.
DeviceID is bound to a column from the Device table.
Set up a query for portname, it is querying the current table (ports) for
Portname and has the following criteria:
[Forms]![frmTestingAGAIN]![DeviceID]. Somehow altogether to row source looks
like:
SELECT Ports.PortName FROM Ports WHERE
(((Ports.PortName)=[Forms]![frmTestingAGAIN]![DeviceID]));
DeviceID has the following query: SELECT Devices.ID, Devices.DeviceName FROM
Devices ORDER BY Devices.[ID];
DeviceID also has a macro set up on AfterEvent which may or may not be set
up correctly as well. But it has requery selected and under argument is says
Portname.
Back in form view: I select a device id from the list, and then I get a
popup:
Enter Parameter Value
Forms!frmTestingAGAIN!DeviceID
(text box)

Any way to fix this?? I appreciate anyone and everyone’s help.

 




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