Any Way Of Numbering The Entries In A Listbox?
Jan 18, 2006Better still, any way of inversely numbering them from top to bottom?
View RepliesBetter still, any way of inversely numbering them from top to bottom?
View RepliesI have a form where a user can select from a listbox (pulled from a database) and "Add product" - it then goes into a Textbox, each taking a new line when "Add product" button pressed. Then when they press "Add Customer" those details along with other entered details gets stored in my Customer Database..
The textbox store multi-line entries in the "ProductName" field heading in database.
Is there anyway i can use a List instead of the textbox? Adding individual entries to one certain customer? I have an EDIT facility aswell so would be easier to have a "Remove Product" button instead of manually backspacing a whole product entry from another textbox (containing all products, on new lines).
I have a combo box that populates many listboxes based on a selection (listbox values are coming from another table [Master]) - simple enough. I want the listboxes to populate with DISTINCT entries - also seems simple enough (right?).
As you'll see below, if the user selects "All" from the combo box (cboSite), I want the listboxes to populate with distinct values from all sites; otherwise, any other selection is a unique site and the listboxes will populate with distinct values based on that unique site.
This works BEAUTIFULLY if I select a unique site, but when I select "All", there is always one (and only one) duplicate value in EACH listbox. That is to say: all values but one in the listbox are distinct.
FOR EXAMPLE:Select unique site (not "All") from "cboSite"
The listbox "lstMajEquip" (which only has values "Yes" and "No") populates to show "Yes" and "No"
Select "All" from "cboSite"
The listbox "lstMajEquip" (which only has values "Yes" and "No") populates to show "Yes","No", and "No" (what?!)
As mentioned, this happens for all 8 of the listboxes, not just "lstMajEquip"...
Using Access 2010
Code:
Private Sub cboSite_Change()
If Me.cboSite = "All" Then
Me.lstBusiness.RowSource = "SELECT DISTINCT Master.Business, Master.Site, Master.Exclude FROM Master WHERE (((Master.Exclude)=False) And ((Master.Business) IS NOT NULL) And ((Master.Business)<>''));"
[Code] ....
I have a table in access which is updated weekly; I need to create two tables from this updated table.
1st table will consist of all the new entries for the current week
2nd table will consist of all the entries from the previous week - an amalgamation of all the entries which are not from the "current week" (table) For example; the table below shows the two entries from last week.
ID
Name
1
Adam
2
Ben
This week I have three new entries New entries
ID
Name
3
Charles
4
Richard
So when I run the same query next week I will get something like this.
Old Entries
ID
Name
1
Adam
2
Ben
3
Charles
4
Richard
[code]....
How do I get a query /queries which divides up the weeks new entries and also all the old entries.
Hi, I'm new here, so I hope I'm posting this in the correct place. I've searched the forum to see if there are any existing threads that might help me, but I've not found anything that does...
(I think this thread ( http://www.access-programmers.co.uk/forums/showthread.php?t=93444&highlight=Copying+data )may be trying to achieve something similar to me, but I'm a beginner and don't really understand it)
I shall stop waffling! I'm not entirely sure that what I'm trying to achieve is possible, I expect it probably is!
Right, I have a form (frmGroupRegister, which contains exactly the same fields as the table it comes from, tblGroupRegister), which consists of three things:
-GroupDate - The date a group took place on. It is my primary key, as no more than one group occurs on a specific date.
-ParentList (A listbox which contains a query showing the ID number, forename and surname of everyone in a table, tblParentDetails)
-ParentsAttending (A blank listbox)
I would like to place buttons in between the ParentList and ParentsAttending, which would allow users to conduct a 'register' of attendance by copying individual/multiple details from ParentList into ParentsAttending (much like you get when choosing which fields to include in a form when using a wizard for example). I would also like them to be able to remove people from ParentsAttending by using a button in case of accidentally adding the wrong person into the ParentsAttending box.
I'm aware that another, probably simpler way of achieving this would be to use a tick-box system, but I feel that visually, the first method would both look better and demonstrate who is present more clearly.
Any help would be much appreciated, but my Access skills are quite basic and things will probably need to be spelled out for me.
I'm using Access 2000 and Windows XP.
Thanks for your help,
Alice :)
I am using the selections made of the form to generate a query for the user.
I have a CITIES listbox that is populated with values from a stored query.
I would like to make it multi-select and populate a LOCATIONS list box and a NAMES list box based upon the CITIES that are selected.
I have the locations currently populated from a stored query that reads the City selection from the Form. It looks like this
Code:
SELECT DISTINCT (t_location.LOCATION) AS Expr1
FROM t_location INNER JOIN t_asset_master ON t_location.LOCATION_PHY_ID = t_asset_master.LOCATION
WHERE (((t_location.CITY)=[Forms]![MasterQueryGenerator]![CityList]));
I also want multi-select so that is you can un-select all and get the results for all cities.
Here is my half thought approach.
Code:
Private Sub CityList_AfterUpdate()
'Dim LocQryStr As String
'Dim r As Integer
'Dim ctl9 As Control
'LocQryStr = "SELECT DISTINCT (t_location.LOCATION) " & _
[Code] ...
I intended to have the variable LocQryStr as the row source but I abandoned the idea of having multi-select when I saw that .Selected(I) never returned true. Its like the values aren't read in this subroutine.
I have a list box called "product list box" based on a query called "searchqry", i also have another listbox called "type list box" , how do i get the type list box to only show "types" based on the section in products list box?
View 1 Replies View RelatedUsing a popup form
1. On my main form, I have a listbox, I would like to edit the values of the listbox.
To do this, I have a popup form with 2 listboxes, one to have the values of the listbox on the main form, and the other listbox with option values for the 1st
1) how to i pass the rowsource sql of the listbox on the main form to the listbox on the popup form
2) how on closing the popup form, do i update the rowsource sql listbox on the main form from the changed value of the popup form listbox rowsource sql
Okay then, after much trouble and confusion, I finally realized I need to use an Extended listbox in order to allow for multiple items to be selected from a list on my form (rather than the evil multiple selection combobox!).
However, now I am trying to figure out how to make one listbox (IndustryClassification) only be visible if the item "Industry" is selected in another listbox (TypeOfBusiness). Coding I can use for this in the AfterUpdate event of the listbox?
Hello,
I have one main table containing most data, that table stores data which is identifies by a unique ID (currently 1-96000), there is also an issue number, I need another numbering system per issue (so you could have issue 166, record 26), any ideas?
Is it possible to do the following?
I have a column with a heading EventNo.
The Event number must be 06-00000 The first 2 digits is the year.
In the Input Mast I have - 00/-00000 and the Default value set as 06-00000
How can I set it up so it can go to 07-00000,08-00000 and so on for next years? The Event number must start at 00001 every year.
It will be impossible to change the default value every year.
Hi I obviously have a table with records in it sorted in assending order. What I need is to know how to make it add into one of the table fields the number it is in the table. IE
Name Time Position Number
Mr Jones - 12:30 - 1
Mr Evans - 12:45 - 2
So if i added 12:35 it would change mr evans position number to 3 and make the new record position number 2.
Is there a way I can number records like 00001 , 00002 ...... 00100 .. . .. ..
I want to alot batch nombers to production lots . so the batch number should look like 000001 and not just 1.
I want to distribute certain materials (found in a query) to several warehouse locations in a sequential order.
So the first found material needs to be put in warehouse location 001,
the second found material needs to be put in warehouse location 002,
etc.
How can I number the lines in a query?
I don’t want to run a create-table-query with an auto number field because the warehouse locations are limited and every time the query runs the numbering has to start at 001.
Shall be grateful for clarifications for these two :
1. I have two fields - TheYear (set to take the current year) and another for sequential numbering. In fact I created this to replace the autonumber field. As suggested by a member I created a Generate button with the criteria as under
Private Sub Generate_Click()
If IsNull(Me![NumFld]) Then
Me![NumFld] = Format(Nz(DMax("[NumFld]", "[DiaryTable]", "[TheYear]='" & Year(Date) & "'"), 0) + 1, "00000")
End If
Me![NumFld] = Format([NumFld], "00000")
End Sub
It works fine. and when the year is changed, the numbering starts from 1 again. My question is how do I make it to auto generate the number so that the user doesnt have to click the Generate button everytime to get the number. Suggestions please.
2. Is it possible to change this sequential numbering midway i.e. to start from a different number and increment by one?
Grateful for help
We have a part numbering system that is currently like this, 11Y22 where 22 increments by one until it gets to 99 where it then goes back to 0, once it goes to 0 the letter increments to Z in this case, now once the last three characters get to Z99, then the 11 gets incremented eg, 11Z99 will become 12A00. Hope that is clear :)
My question is, can this system be implemented into the auto numbering in Access?:confused:
Thanks in advance
RD
Is it possible to start auto numbering from a number other than 0? Say 2000 for example.
Thanks in advance
RD
Hi there
I'm sure that this must be easy, so go gently on an old codger!
I have a query for which I wish to add another field containing a running total of the number of records produced by the query (after all sorting etc.).
In other words, if my query produces n records, that new field would contain the value 1 in the first record, 2 in the next and so on to n.
Any ideas would be much appreciated
I have created a work order application, and the process is that it takes total number ordered of an item, divides it by a factor, and then prints x number of work orders, example qty ordered 300 = 5 work orders, 4@72 and 1@12, my question is, now I want to appended the work order number with a count number, example wo555-1, wo555-2 and so on, grouping on the work order number, so each work order start again at 1. I am stumped, can anyone help.
View 3 Replies View Relatedcan I make a field that can auto-number which the format that I want??
As I know that there is two format for auto-number
but I don't like them
I want to number my own format
like
XXX-YYYYMM-ZZZZ
XXX is the category number that would be selected in the form connecting to table
YYYYMM is the date year and month
ZZZZ is another auto numbering
Can I do so
I would like to create an expression that would number each item in sequential order in a query .
I cannot use autonumber on the table because I am pulling it from SQL and do not have clearance to change the actual tables.
I have been searching through this forum for the last 2 hours and have not come across anything similar to this, so I hope I'm not covering a topic that has already been covered.
Any help will be greatly appreciated.
Thanks!
Lori
How do I get a auto Number to start a 1001?
J
Hi I am a newbie on here!!!!! Anyways, now that I got that out of the way.... I need help on my Access Database. Hopefully this isn't a stupid question..... I would like to have one of my cells in my form to automatically count from 1000-9999 when I go to the next form. when it hits 9999, I need it to start over, but not delete any of the previous entries that I have in there. Anyone willing to help me out?
Greatly Appreciated, I am sure I will have more questions!!!
I have a report that produces invoices and gets its data from a multi-table based query. The query has multiple lines for each customer and the report groups and totals them. How can I have the invoices numbered sequentially? Any help please?
View 2 Replies View RelatedI have an existing table with a field labelled Job Number (17 Job Numbers). Each month I import a new table and match each record via another field (serial number). For each new record, one or many, I want to attach a sequential Job Number. In this example the new job numbers need to start at 18 then 19 etc. How is this possible? I am fairly new to Access so please be gentle!. Cheers
View 2 Replies View RelatedI have a form to enter RMA data. I need to start my numbering at 4000 without using an autonumber. The ID field is text and cannot be changed. The Customer_Order table is a linked table. A letter is going to be added infront of the ID depending what the user chooses from a combobox. The letter(R,A,C) signifies what type of transaction it is. Here is an example -
R4000
A4001
A4002
Currently there are about 100,000 records in the database but none with an ID between 4000 and 10000. The majority of the records have a letter preceeding the number. Any ideas on how to start numbering at 4000?