I need some help with regards to a small db application im developing.
I currently have a form that contains two separate list boxes.
The first contains "Measures" and the second "Dimensions". They are based on the underlying tables Measures and Dimensions respectively.
My intention is to be able to select whatever Measures I want and select the dimensions they relate to in the other list box then click on a command button to run a query that would update/append my underlying table, Measures2Dimensions, which is linked to the tables that the list boxes are based on.
I hope I've described my problem well enough for someone to provide me with some help.
I have three list boxes on a form (lstSubjectName, lstTargetGrName, lstCountryName). The list boxes are populated from queries based upon tables that have a many-to-one relationship to the main table. The queries are the following:
SELECT tblProjectSubject.ProjectID, tblProjectSubject.SubjectName FROM tblProjectSubject WHERE (((tblProjectSubject.ProjectID)=[Forms]![frmViewPro]![ProjectID])) ORDER BY tblProjectSubject.SubjectName;
SELECT tblProjectTargetGr.ProjectID, tblProjectTargetGr.TargetgrName FROM tblProjectTargetGr WHERE (((tblProjectTargetGr.ProjectID)=[Forms]![frmViewPro]![ProjectID])) ORDER BY tblProjectTargetGr.TargetgrName;
SELECT tblProjectCountry.ProjectID, tblProjectCountry.CountryName FROM tblProjectCountry WHERE (((tblProjectCountry.ProjectID)=[Forms]![frmViewPro]![ProjectID])) ORDER BY tblProjectCountry.CountryName;
The form is based on the main table (tblProjects). I want to re-populate/update the list boxes when the ProjectID on the form changes. I have tried to use a macro (ProjectID_AfterUpdate) for requery of the list boxes, but can't get it to work. Any other solutions? Thanks. Niels
I have a form called Adaptation Form in which Last Name and Course Number are entered.
The user looks up Last Name using a listbox on the form, and looks up Course Number using a second listbox on the form.
To use the form, the user looks up Last Name in the listbox, finds the ID number associated with the Last Name, and enters the ID number on the form. The form then autopopulates with the last name. The process for entering a Course Number is the same.
This populates the query underlying the form, but not the table. All that gets populated in the table is the ID Number for Last Name and the ID number for Course Number.
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.
How to populate a list box using another list box on the same form. I have this working completely fine if the the source list box has the multi select property configured to be off, however I need it to be set to extended multi select.
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.
I have a form with several yes/no boxes (set up as TRUE or FALSE in the table). I want to place a command button, that if i click it, all the check boxes i want to be populated with the value of TRUE, populates them. I was attempting to do this through the expression builder. Would doing this in VBA be a better option? well if any one has any advice, or can help me with this, then thank you.
I have a form with ID, town and address on it. I want to beable to type in an ID, press enter then if the ID exists in a query then populate the town and address text boxes with the correct info..
If the ID doesn't exist, then open another form so the user can choose the site from the list..
At the moment I think I am going about it the wrong way :
I need to populate a text box with data from a single cell contained in a table.Im hoping to use two combo boxes that when selected will select the cell. The combo boxes select data sources from the same table. One combo the row the second the column. One combo is already in use and populates several fields in the form. In the same form I'd like to place the second combo and beneath it have a text box that will populate with that cell detail.
I'm using three combo boxes - The second (cbosubSkillList) is limited by value selected in the first (cboSkillList). The third (cboSubSkillList2) to be limited by value selected in the second. The third will not populate - If I comment out the code, It WILL populate will all values, but will not populate with code active. All names, properties, etc. with combo boxes, tables, field names parallel - Why am I not populating the third box?
[Code] Private Sub cboSkillList_AfterUpdate() With Me![cboSubSkillList] If IsNull(Me!cboSkillList) Then
I currently have 3 tables within a database with student details of three different classes. I need to create a user form that has a dropdown box which I can select a student from one of these tables with a number of text boxes below which brings up all the students details, then once the student has been selected and the correct details are shown then I need to create a button which allows me to move that student from one table to another.
My company is finally using my accounts package (alongside our original package until we can be certain there are no bugs).
Anyway just adding nice to have features at the moment.
I've got a form that has 5 combo boxes where the user can select 5 customers. Then a button so they can graph the amount of money generated by each customer and compare them.
I've just made a query to return the top 5 highest grossing customers.
What I what to do now it feed the query results into the combobox values when I press a new button on my form.
I am working on a database where law clerks input the tasks that they accomplish each day. They use a form called "TaskDetails" to input all of the information related to their daily tasks via combo boxes. The problem I have is: often times the clerks work on the same task more than once and I would like them to be able to continue tasks already in progress - using notes to indicate what particular portion they completed that day.
In order to do this I would like to have a combo box that is based on a query of all of the tasks the clerks have completed. When they select a Task Name from the combo box, I would like all other combo boxes on the page to auto-populate based on the selection.The query that my combo box is based on includes all relevant fields.
When I click on the "Task Name" combo box I am presented with all of the records related to tasks. The fields/columns are divisionofwork, subcategory, workassignedby. I have combo boxes for all of these fields on the same page, bound to the table of tasks. Ideally, a clerk makes a selection from the "Task Name" combo box, and the subsequent 3 combo boxes will reference their relevant column in this selection and auto-populate.
I have a data entry form that is also used for editing exsisting records, upon the opening of a record the form populates with all the data of the record apart from what is previously selected in combo boxes, so I need to find a way to re-populate those comboboxes?
I have a form called frmPO based on a table called tblPO One of the fields in tblPO is linked to the field idAddress in the table tblAddresses
The following fields exist in both tblAddresses and tblPO Company Address1 Address2 City ZP State
The form contains controls for these fields on tblPO. I would like to give the user the choice to either enter a shipping address manually, or selecting a preregistered address from tblAdresses. For this I would like a combo box showing the values of idAddress. I f a user selects a preregistered shipping address, I would like the form to fill the rest of the fields based on the value of this control.
My understanding is that I should set a BeforeUpdate event to set the values of the different controls, unfortunately my command of VBA amounts to 0.
Is it possible to populate several fields on a form via a Nma e selected from a list box ie: the list box has several names in it, the names have data from another form (user details) such has Payrole No:, Holiday entitlement, etc.
I want to select a name from the List Box and have it populate (enter) data into field in the form being used.?
Hi there, I am finally underway with the forms etc, after having spent weeks planning and setting-up the table/relationships. I have entered some sample data so that I can test out the forms as I go. I have an "Unbound" list box and an "Unbound" combo box, (along with other stuff) on a form. The list box gets it's data from a Junction Table between "Customers" and "Products". I can get the list box to populate itself with ALL the product items in the junction table but I have tried and tried to filter the items down to match the selected value in the combo box. A couple of diagrams (jpegs) can be viewed here If anyone could spare the time to enlighten me on this "blind-spot" I would appreciate it very much. Thanx
I am in the process of (attempting) to develop a database and application for Parking & Violation Management. I have two tables at this point: "Parking Registration" and "Violations" that are linked by a "Permit #". I have developed a form that will allow the officer to enter either the "Permit" or the "Licence Plate" of a vehicle to run a "Vehicle Check" query to produce specific information for the vehicle in question; which is what I wanted, kind of... The problem is that the resulting data pops up in "table" format, and contains multiple fields, making review of the data difficult due to its lengthy, linear nature. Is there a way to have those results appear in text boxes either on a separate form or the "Vehicle Check" form itself?
In my list box I have two coloums, Surname and Christian Name, now can I get both names to go into a text field. I can get one of the names i.e surname or christian name by changing the bound coloum from 1 to 2. But I need both names to go across?
So Im trying to populate the listbox using string connection and having this error: "the object you entered is not a valid recordset property"
here's the code: Dim cnn As ADODB.Connection Dim rst As ADODB.Recordset Set cnn = New ADODB.Connection cnn = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=xxx;DATABASE=xxx;Port=xxx;USER=xxx; PASSWORD=xx;OPTION=3;"
[code]....
Where is the error??? am doing right or is there any better way to populate listbox from string connection.
I have a tabbed form from which the user can select a contact's record from a subform on the first tab, click a edit command button, and the unbound text boxes on the top of that tab populate. The user can then click the second tab with employment history which has blank unbound text boxes and another subform which is linked by the contact id to the first tab.
The user can select a record in the second tab, click a command button and the text boxes populate no problem. The problem comes when the user changes the contact on the first tab, and then tries to edit a record on the second tab. Then I get a run-time error '-2147352567 (80020009)' saying the value you entered isn't valid for this field. Why it would work the first time by not the second?
I have a listbox call lst with two columns, what I want to do is to populate this two column with "firstdata" and "seconddata" respectively. What I do is: Me.lst.RowSource = """firstdata""; ""seconddata"""
But I see nothing appear, what is the corect way to achieve in vba?
I wish to automatically fill in a form in datasheet view with records from a table. Currently you need to select each record to fill the list. I think this can be done using VBA, I'm a begininner to programming but think I need the code to do something like this.
Lookup the table or query, DoCmd select the first record, DoCmd select next record, Loop to end of recordset??
Basically it is automatically entering/ filling in each row (record) in the datasheet for every record in that table or query.
I am trying to populate a ListBox with the names of the tables from another database. I have the following function which loops the table names from the database I want. The function is caleld on Form Load and passed into the ListBox but the List Box is empty.The message box in the function does display the table names when called from the form. I just cannot get the list box to populate.
Code:
Public Function ListTables() Dim db As Database Dim i As Integer Dim s As String Dim tdefs As TableDefs, tdef As TableDef Set db = DBEngine.OpenDatabase("C:MyPathAnalyzed Tables.mdb")