My problem is that i have a combobox that displays two fileds, when selecting it will populate the data in the text boxes. Before I explain my problem though you may need to understand my database. Also i am building the frontend in Acess 2007, the backend is already built in SQL Server, the SQL data is linked to Network Visio Diagrams of each Network Location, displaying all the various types of network gear and the asscoiated data for each device. The access is for the user to edit or create new data for the SQL database.
I have 5 tables but only two matter here:
Device Attributes: DeviceName (PK); AttributeName(PK); AttributeValue(can contain Null)
example data:
OH01CSW01; IP Address; 127.0.0.1
OH01CSW01; Type; IEEE
OH01CSW01; SerialNumber; 745087250
There will be multiple DeviceName data that is the same.
Bascically this is a table for Network gear and the feilds of data for each device.
The next table is:
tblDevice: LocationID; DeviceName(PK); Manufactuer
example data:
OH01; OH01CSW01; Cisco
OH01; OH01CSW02; Cisco
As DeviceName is the PK there can not be duplicates
So I have a form that allows me to create and edit the tblDevice.
Now I need a form that allows me to edit the DeviceAttributes table.
I have created a table titled DeviceAttributes
The table has three text boxes: DeviceName; AttributeName; AttributeValue
Record Source: DeviceAttributes
Record Source Qualifer: dbo
I have an on load event that open the form blank.
I have a combo box and this is where things are starting to get hairy.
Row Source:SELECT [DeviceAttributes].[DeviceName] FROM DeviceAttributes ORDER BY [DeviceAttributes].[DeviceName];
After Update: Macro: Search For Record: , , First, ="[DeviceName] = " & [Screen].[ActiveControl]
So when I click on the arrow in the combo box it pulls the list down ie:
OH01CSW01
OH01CSW01
OH01CSW01
Now each of those contain differant attributenames and attribute values
If i select one it WILL populate the text boxes, BUT if i select the next one it will keep the same data from before in the text boxes. It seems like it is only allowing to show the data for AttributeName per DeviceName. I can slect another DeviceName, like AZ01CSW01 and it will show the new data for this but again if i select another AZ01CSW01 it will keep the original data from before in there.
Also i would like to have the combo box show the DeviceName and the Attribute name.
I have tried this:
Row Source:SELECT [DeviceAttributes].[DeviceName], [DeviceAttributes].[AttributeName] FROM DeviceAttributes ORDER BY [DeviceAttributes].[DeviceName];
Same After Update Macro
Column Count 2
So it show the combo box like this:
OH01CSW01 | Type
OH01CSW01 | IP Address
OH01CSW01 | Model
OH01CSW01 | Serial Number
OH01CSW01 | Number Of Ports
So again if i select one, say OH01CSW01 | Type, it will populate the text boxes, OH01CSW01 | Type | IEE803, but if I select OH01CSW01 | IP Address, it will keep the data from before. Now if i agian go to a new DeviceName like AZ01CSW01 and select it will populate the text boxes with the new data, but again when switching within the same device name but differant attributename it does not.
I hope this isnt two confusing and could really use the help
thanks!
I have 5 tables but only two matter here:
Device Attributes: DeviceName (PK); AttributeName(PK); AttributeValue(can contain Null)
example data:
OH01CSW01; IP Address; 127.0.0.1
OH01CSW01; Type; IEEE
OH01CSW01; SerialNumber; 745087250
There will be multiple DeviceName data that is the same.
Bascically this is a table for Network gear and the feilds of data for each device.
The next table is:
tblDevice: LocationID; DeviceName(PK); Manufactuer
example data:
OH01; OH01CSW01; Cisco
OH01; OH01CSW02; Cisco
As DeviceName is the PK there can not be duplicates
So I have a form that allows me to create and edit the tblDevice.
Now I need a form that allows me to edit the DeviceAttributes table.
I have created a table titled DeviceAttributes
The table has three text boxes: DeviceName; AttributeName; AttributeValue
Record Source: DeviceAttributes
Record Source Qualifer: dbo
I have an on load event that open the form blank.
I have a combo box and this is where things are starting to get hairy.
Row Source:SELECT [DeviceAttributes].[DeviceName] FROM DeviceAttributes ORDER BY [DeviceAttributes].[DeviceName];
After Update: Macro: Search For Record: , , First, ="[DeviceName] = " & [Screen].[ActiveControl]
So when I click on the arrow in the combo box it pulls the list down ie:
OH01CSW01
OH01CSW01
OH01CSW01
Now each of those contain differant attributenames and attribute values
If i select one it WILL populate the text boxes, BUT if i select the next one it will keep the same data from before in the text boxes. It seems like it is only allowing to show the data for AttributeName per DeviceName. I can slect another DeviceName, like AZ01CSW01 and it will show the new data for this but again if i select another AZ01CSW01 it will keep the original data from before in there.
Also i would like to have the combo box show the DeviceName and the Attribute name.
I have tried this:
Row Source:SELECT [DeviceAttributes].[DeviceName], [DeviceAttributes].[AttributeName] FROM DeviceAttributes ORDER BY [DeviceAttributes].[DeviceName];
Same After Update Macro
Column Count 2
So it show the combo box like this:
OH01CSW01 | Type
OH01CSW01 | IP Address
OH01CSW01 | Model
OH01CSW01 | Serial Number
OH01CSW01 | Number Of Ports
So again if i select one, say OH01CSW01 | Type, it will populate the text boxes, OH01CSW01 | Type | IEE803, but if I select OH01CSW01 | IP Address, it will keep the data from before. Now if i agian go to a new DeviceName like AZ01CSW01 and select it will populate the text boxes with the new data, but again when switching within the same device name but differant attributename it does not.
I hope this isnt two confusing and could really use the help
thanks!