B
BV2312
Hi
thanks for your response.
I still do not get where I would put the 'if' function.
Maybe a easy example can help:
I have combo boxes for county and city in a table called address
once I selected 'Nottinghamshire' in combo box county then the combo box
city would be populated with:
Rushcliffe
Broxtowe
Ashfield
Gedling
Newark and Sherwood
Mansfield
Bassetlaw
Nottingham (Unitary)
or I have selected Derbyshire then city would be populated with:
High Peak
Derbyshire Dales
South Derbyshire
Erewash
Amber Valley
North East Derbyshire
Chesterfield
Bolsover
Derby (Unitary)
and I was wondering if it was possible to be able to do this as the table
design level in the 'row source' in city combo box.
so if notthinghamshire is select then city has x, y, z and if county =
derbyshire then city = a, b, c
hope this helps in understanding what I would like to do
Regards
BV2312
thanks for your response.
I still do not get where I would put the 'if' function.
Maybe a easy example can help:
I have combo boxes for county and city in a table called address
once I selected 'Nottinghamshire' in combo box county then the combo box
city would be populated with:
Rushcliffe
Broxtowe
Ashfield
Gedling
Newark and Sherwood
Mansfield
Bassetlaw
Nottingham (Unitary)
or I have selected Derbyshire then city would be populated with:
High Peak
Derbyshire Dales
South Derbyshire
Erewash
Amber Valley
North East Derbyshire
Chesterfield
Bolsover
Derby (Unitary)
and I was wondering if it was possible to be able to do this as the table
design level in the 'row source' in city combo box.
so if notthinghamshire is select then city has x, y, z and if county =
derbyshire then city = a, b, c
hope this helps in understanding what I would like to do
Regards
BV2312
Wayne-I-M said:I assume that you are talking about a form that is based on the table with
the cpu details, etc
Ensure that all the fields are on your form - after you have run the code
below all the fields will "autofill"
Create an unbound combo
The row source type for this combo should be Table/Query
The row source should be a query that contains the cpu_name
Set the coloums width to to 2cm
Bound coloum = 1
Call the combo CPUSearch
On the after update event of this combo place this code
Private Sub CPUSearch_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[cpu_name] = " & Str(Me![CPUSearch])
Me.Bookmark = rs.Bookmark
Me.CPUSearch = ""
Me.cpu_name.SetFocus
End Sub
The last 2 lines
Me.CPUSearch = ""
Me.cpu_name.SetFocus
Will re-set the search combo to null ready to take another search and also
set the focus to the cpu_name field
You can delete these if you don't want/need them
Hope this helps
--
Buon Natale, Happy Chritmas.
Wayne
Manchester, England.
Scusate,ma il mio Inglese fa schiffo
Percio se non ci siamo capiti, mi mandate un
messagio e provero di spiegarmi meglio.
BV2312 said:Hi people,
I know this must be a common question but i can't seem to find the
answer...
I have a table that has details of processor details:
table name - computer
serial number
cpu_name
cpu_speed
RAM
HD
i want to do the following:
"cpu name" as row source/validation/combo box it can be intel pentium I,
II,
II
Once i have selected "Intel pentium III" on cup_name
i want cpu_speed to be populated with "500" "550" etc
I would prefer using row source in cpu_speed to show details if pentium
III
is selected
Thanks