473,320 Members | 1,991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

select from list

20
What i have is a stock control system. What i would like is to be able to display all the colours we have in a list.

Then from this list be able to select a colour and then show all the stock levels for this.

How do you suggest the best way to do this?
Jul 2 '07 #1
6 1592
Stang02GT
1,208 Expert 1GB
What i have is a stock control system. What i would like is to be able to display all the colours we have in a list.

Then from this list be able to select a colour and then show all the stock levels for this.

How do you suggest the best way to do this?


I would suggest using a combo/list box with some vba code to pull up what you select from you combo/list box.



here is some vb code to use in the after update_event of the combo box. This will bring up what you select in the combo box.
Expand|Select|Wrap|Line Numbers
  1. (combo box name)_AfterUpdate()
  2.     If IsNull(combo box name) = False Then
  3.         Me.Recordset.FindFirst "[Feild you are searching for]=" & combo box name
  4.     End If
  5. End Sub
Jul 2 '07 #2
aman909
20
I have tried that but i keep getting a run time error. The code i have used is:


Private Sub Supplier_Colour_AfterUpdate()

If IsNull(Supplier_Colour) = False Then
Me.Recordset.FindFirst "[Stock]=" & Supplier_Colour

End If

End Sub

Can you tell me what i have done wrong?
Jul 3 '07 #3
Stang02GT
1,208 Expert 1GB
Do you have the combo box or what you are using bound to the data that you are searching for?
Jul 3 '07 #4
aman909
20
Do you have the combo box or what you are using bound to the data that you are searching for?
Im using a list box. Which is looking up a table
Jul 3 '07 #5
Stang02GT
1,208 Expert 1GB
Try switiching it to a combo box, and go through and use the wizard when you make the combo box because it might give you the option to program the box to look up records for you.
Jul 3 '07 #6
aman909
20
Try switiching it to a combo box, and go through and use the wizard when you make the combo box because it might give you the option to program the box to look up records for you.
I have created a combo box and showed it what to look up. But when i use the combo box and change colour, it isn't changing the stock level on the form.
Jul 3 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
3
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing...
5
by: callmebill | last post by:
I'm relatively new to javascript, and I'm trying to decide whether the following (and if so, clues on how to do it): I'd like to create two HTML multiple-select boxes. The first would be a list...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
4
by: Ian Richardson | last post by:
Hi, The function I've put together below is a rough idea to extend a SELECT list, starting from: <body> <form name="bambam"> <select id="fred"> <option value="1">1</option> <option...
7
chunk1978
by: chunk1978 | last post by:
hello. so i have 2 select menus which add and remove options from a 3rd select menu... it seems, however, that it's not possible to use different select menus to toggle a 3rd, because when an...
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.