Im tryin to move data from one list box to another ive seen some sample datebases and how they use command buttons to move the data back and forth from the list boxes (usually have <, >, <<, >> on the command buttons)
I have a form with a List Box (List BoxA) that returns a value from a query. I then have a Text Box (Text BoxB) that uses the value from List BoxB and multiplies it by let's say 2. It works giving me the correct value but only becomes visible after I click inside List BoxA. How can I make it visible as soon as the form is opened? I tried refreshing the form data, didn't work and I tried a requery macro which didn't work either.
Allen Browne's "Use a multi-select list box to filter a report" solution, in particularly with two multi-select list boxes? The code works fine for me for either box so long as I code it for one box alone. Combining the two into one code results in a type mismatch error. I'm trying to use the code to pass the contents of both multi-select boxes as Where conditions to a report. Both boxes are based on number fields. To try to isolate the problem, I've removed Allen's setDescription and OpenArgs conditions. We're unfortunately still on Access 2003 as the company desires to squeeze every dime by using until end-of-life next year.
Code: Private Sub cmdPreview_Click() On Error GoTo Err_Handler 'Purpose: Open the report filtered to the items selected in the list box. Dim varItem As Variant 'Selected items
Hi everyone, I have been making progress with customizing a MS Access program, but one major problem is that I have been trying to make a List Box or Combo Box that I can use to enter data in the TABLE, but I find that I get a pull-down list that has the list of values from only the parameter that is primary key. More specifically, the program is set up as follows: I have two tables in this program: One that is called "invoices" and one that is called "items". In both of these tables, there is one common parameter, which is "Item Number". Item number is the primary key, and I used the "relationships" function to tie this parameter to itself between the two tables. I was successful in setting up a list-box for the "Item Number", but when I try to set up a list-box for another parameter that is supposed to display a person's initials, the pull-down list displays the list of item numbers instead of the list of people's initials. In fact, I don't know if there is an extra step I need to take so that the database stores a list of people's initials. Instead, I just fill in the initials in the field for each record for which the "Item Number" is the primary key. How can I get the list-box to pull down a selection of different people's initials, or in other words how can I get all the people's initials to be stored so that the list of initials can be looked up. Just so you know, I have tried different choices of entries in the "Lookup" tab in the Design mode of Tables, including Display Control, Row Source Type, Row Source, and Bound Column, but the outcome is that the only parameter that I get get in the pull-down list is the primary key, which is Item Number. I appreciate any help you can offer in explaining how to correct this. On a separate note, one of the parameters is "Date", and on the reports, I'm trying to figure out how to filter a specific date range so that I can limit each report to a specific month. Please advise me on this procedure as well. Thanks.
How would I create not only a list box but a Cascade combo box in Acess could you help me out on this thread?
So when I selct J for J Richard Szeremany the next ABC box only lists the CD's by that Artist then I click on the Name of CD and the song onfo comes up.
Im having a problem with a listbox/query/label. My DB is based on one that was posted in the sample database are of this forum. In itself it works really well. Clicking on the labels at the top of the list box applys a sort to the list box, each one of these sorts is based on a query. My porblem is that I want to be able to produce and print a report based on those queries. I know I could put a bunch of buttons on the form and do it that way. Or put a list box with all the my reports in and do it that way. I would prefer though, to have one button with one report reading the information from the different queries depending on what label is selected. Hopefully thats clear, the DB demonstartes it better. Any help appreciated. Thanks!
I am struggling to create the "hidden" control. I'm assuming it should be a text box? Where should the code given on the above page go in the text box properties? Do I need to do something to activate the code after selections are made in the list box?
I have an unbound list box with it's row source a query whose select criteria comes from another list box once selected. When the form first opens the list box is empty until the user makes a selection. How do I prevent access from running the query in the first list box when the form first opens. It slows everything down.
I want to be able to specify the site of a disease. I had a combo box with pre-defined options (linked to a LU table) but now i find out there can be multiple disease sites. I changed it to a list box and chose multi-select (extended) but this does not retain the values in the form or record them in a table (even when I use the wizard and tell them what field i want the results in). What am i doing wrong or have I missed the whole gist of what a list box is for? Cannot find anything on line to help me here
I a list of data in a list box and i want to be able to choose diiferent pieces from the list. How can i ref an individual record in the list box do you use
ME.Listboxname.value something like that im lookin to move pieces of data from one list box to another for printing
i can move all the records by using Private Sub MoveAll_Click() Dim strSQL1 As String
strSQL1 = "Update projects SET projects.Selected = Yes Where projects.Selected = No"
DoCmd.SetWarnings False DoCmd.RunSQL strSQL1 DoCmd.SetWarnings True Form.Refresh End Sub
and i can move them all back by using
Private Sub RemoveAll_Click() Dim strSQL2 As String
strSQL2 = "Update projects SET projects.Selected = NO Where projects.Selected = Yes"
DoCmd.SetWarnings False DoCmd.RunSQL strSQL2 DoCmd.SetWarnings True Form.Refresh End Sub
I have a list box that contains 4 fields and the list box is located on a form. One of the fields on the form is [Date logged]. This is also colum 2 of the list box. I am trying to write some code to say that if the Date logged on the form is different to the one in the list box, run an append query. Basically, the principal behind this is to have an audit trail of when records have been ammended. The first time a record is created, a base record is created. It is this base record that will populate the list box along with all other record changes that occurr from that point on. I am trying to say that if the [Date logged] does not match the last record in the list then it knows it needs to append the record to the history table again as a change has been made. I would really appreciate some help here folks. Thanks so much! :-)
I have got what seems to be a pretty straight forward task i need to do!
I have got a table named tblInput, with four fields Type, Collection, Value and Reason.
I need to give the Type field two possible options "a" or "b", i then need the Reason field to display a list of values depending on whether "a" or "b" was selected in the Type field.
Values for "a" need to be "Success", "Failure" or "Rejected"
Values for "b" need to be "Status Change" or "Amendment"
I have been playin for a couple hours now trying various differnent methods but i am commin up short, its this something i am able to do from a table?
Hi, im kind of new to access and im not sure whether this is possible or not, but i have a problem which needs to be solved by 4 list boxes on the same form.
The first list box will have 4 choices in it and depending on which one is chosen the second list box will be updated. This continues on to the 4th list box, which when a choice has been made a new form will open with the relevant information from the tables.
I hope this is enough information to enable someone to aid me with my problem, thankyou very much for your time.
I am working on a database for a bowling tournament. I'm currently working on a form where the user selects from a combo box bowlers' names for doubles pairings. I thought that as a helpful tool I would also display a list of available remaining bowlers once the combo box information has changed.
I'm trying to write a module for the combobox_change trigger. What I'm having trouble doing is pulling the updated recordset from the base form and using that to update the availability box -- in other words, how can you query data from the recordset underlying an open form before the form is closed and the data is saved to the tables. The only way I can do this now is to temporarily close the form, manipulate a recordset from the table, then re-open the form. There's got to be a better way. Maybe I'm just missing something here.
I am having a lot of trouble trying to understand List Boxes in general and am hoping someone can explain them for me.
My problem is I have a database where a user has one unique ID number, but they can have several departments that they can be linked to in another table. I'd like to be able to have the various departments listed in a List Box with the departments that the user is linked to automatically selected when viewing the form.
Then if I was to add a new user, I'd select each department by using the Multi Select feature and add those details to the existing database.
Does this work or am I way off track here?
I hope that makes sense. My experience to date has been creating tables in Access. Everything else is new to me.
I am doing a search form on a database and after the search, I have 'new search' & 'refine search' options. The list box is filled from a query and when the user selects 'new search' I want it to show nothing selected.
I have a form with several different list boxes which display the hours worked per week for an employee that the user chooses from a combo box. This all works fine, but when I tried to make a box with the sum of all the hours worked per quarter nothing happens unless I click on the list boxes that contain the numbers. When this happens i get the correct sum sometimes. Other times i get very large random numbers and other times ill get the numbers next to each other (ex. 2020 when trying to add 20 + 20). If someone could give me some suggestions on how to fix this that would be great.
I am currently working on a database and have some little issues with list boxes on forms. Some formatting issues which seem simple but can't figure out ...
I'm attaching a sample DB with one table and one form having a list box. 3 things which i'd like to have with my list box :
1. is it possible to right-align the values in the last 3 columns of the listbox?
2. is it possible to have the rate displayed in 4 decimal places rather than 2? I have formatted the query to output the results in 4 decimal places but the listbox still outputs only 2 decimal places.
3. is it possible to sort the data in the listbox by clicking on the column headers? or this is only possible by placing command buttons and filtering the SQL query according to requirements?
i have a form that has a 6-column list box that displays results of a query. I want that when the form loads, the first record is automatically selected in the list box. I have a feeling that this should be something really simple... but I dont know how to go about it. I will really appreciate all help!
I am having the same problem as some others. I have 2 cascade combo boxes When I select CD Group and CD NAme they display the related values in a list box that's fine.
ex. CD Group Mormon Tabernacle Chior CD Name displays cdnames with that Group. NOW After I click cdnames I want it to go to that record on the subform which is cdtracks so it only displays cdtracks with that record.
The other problem is this might have to be straightened out is when I select a cdgroup and or cdname value it displays that value for all the records. email mikevds@optonline.net so I can send you a attatchment
I have a form that has a subform within it. The subform has text boxes showing the values of various fields in a table. The user can scroll forwards and backwards within the table records, update and save, and delete. What I want to do is have a "List Box" that shows the whole table but still connected to the SubForm above it. This way a user can quickly scroll down the table in the "List Box" and select a record and have that record show up above in the text boxes.
So by selection within the "List Box" the record will be displayed above in the SubForm
Hi, I am trying to create a button that upon click it moves the slelected item in list box one to list box 2 but i am not sure how to go about it, cany anyone help?
I am really at the end of my teather with this problem so i really hope someone here can find a solution.
I have 2 tables; Client (Client general info, defined by their location), ClientHardware (Info on the hardware a client has and also it's condition).
I need to be able to select one or more clients and display one or more conditions of their hardware, e.g. London, York, Bury + Red, Amber, Green condition.
After the Query is working right i will need to output it to a report through a button on the form.
I attempted adapting This Method (http://www.databasedev.co.uk/query_using_listbox.html) but adding another list and query just resulted in the report showing the all the records of the selected client (e.g. london) then all the records with the selected condition (e.g. bad) it would be ok if i could merge the list box selections into one query but right now it looks like this
MyDB.QueryDefs.Delete "qry ClientName" Set qdef = MyDB.CreateQueryDef("qry ClientName", strSQL)
MyDB.QueryDefs.Delete "qry RAGType" Set qdef = MyDB.CreateQueryDef("qry ClientName", strSQL2)
Is it possible to put the variables in strSQL2 into the creation of qry ClientName somehow?
Any help, large or small will be appreciated as I'm really at a dead end with this.
I am trying to put a DROPDOWN LIST BOX in a access 2003 form, NOT a combo box. I only need this so I can disallow users from manually entering data into the combo box by typing it in. I want them only to be able to choose it from a list. I think that a LISTBOX is the only way to do this, other that using a straight list box, which would use too much room. However I cannot find any way to add this to a form. Any thoughts?