Selecting Data From A Combobox To Get More Data In A Listbox
Nov 21, 2005
im new to this so hello every1!!!
umm.. i have a form with a combo box which is linked to a table which gives me customer id numbers. and i have a listbox which i want the names and addresses to appear when i select a cusotmer id number from the combo box
so on the list box i put
" SELECT CustName FROM Customers WHERE CustID=$combo43; " in row source; if i change $combo43 to 0 the name appear but that is fixed and i want it 2 change when i select a cusomer id number from the combo box
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 :)
im trying to select data from an access database via asp. the data must be stored in a recordset and fit the criteria as given in the variable varItemSelected:
heres what i have
SQLstmt = "SELECT * FROM Products WHERE product = " &_ varItemSelected
set rs = con.Execute(SQLstmt)
but i get the error: Microsoft JET Database Engine error '80040e10' No value given for one or more required parameters
I have a database which records time spent on various projects and I would like to be able to calculate the time spent on any particular project between two selected dates. The report and the query behind it already works to display the time accrued on all the dates of a project, but I want to be able to break it down to small ranges of dates
I have a form on which the user selects the start date and the end date. How can I apply this calculated information as a criteria in a query so that I can produce a report with the relevant information on it.
I already have the report and the date selection form designed. The dates selected go into two unbound fields which have a date format.
Each record in the database has a subform (one to many relationship) with multiple records. When the user clicks on a record in the subform I want the information from the subform and from the mainform to go into a Word document. I am able to pull the data from the main form but not from the sub form. Any suggestions would be appreciated. Below is an example of what I am using to get the data out of the main form for the bookmark in Word called "ClientName".
I have data in a table I am extracting using an append Query, I wish to assign a number from the original table +1 to the records pulled by the append query. I am very new to this and have the expression below, however the result is #error in created field CertifNumber The data I am looking for is in table Sample Details and the Field is CertNo
Hi, I have 13 tables in all. 2 are Area and Scope which have unique entries of areas and scope and the remaining 11 will have a primary key, Tag_No. I want to select data from these 11 tables such that ALL the data will be pulled out but say table 1 has a column MOC and remaining 10 tables dont, then it will be a blank or null in those columns for the 10 tables. How can this be done? (I hope I am not confusing!!!) Adwait
I am having trouble writing what I think should be a fairly straight forward query... I am have a table with 2 fields, the first contains a list of subjects, the second contains a list of scores that students got in their tests in that subject.
So the data looks like this:
Maths 54 Maths 69 Maths 41 English 71 English 55 Art 44 Art 43 Art 66
I would like to write a query that selects only the highest score for each subject and presents it like this:
I am constructing a database for a friend and need to filter data from a daily log to enable a report to be generated for each months actions. I have created fields of: entry date, month and year with the view of filtering by month and year. How do I perform this task?
I would like to create a excel file to let the user to input the following column.
Date No. of success No. of failure ==== ============ ============== " " " " " " " " "
I would like to have a function that can allow the user to select the date range and its total no. of success and no. of failure
For example , the user select from 31-03-2001 to 31-12-2012 , then output the report which show the total no. of success and no. of failure in this date range , is there existing tamplate that I can use ? if no , what is the simplier way to do it ?
if the data is very large , I want to create a access db to store it , how to do it ?
I would like to create a excel file to let the user to input the following column.
Date No. of success No. of failure ==== ============ ============== " " " " " " " " "
I would like to have a function that can allow the user to select the date range and its total no. of success and no. of failure. For example , the user select from 31-03-2001 to 31-12-2012 , then output the report which show the total no. of success and no. of failure in this date range , is there existing tamplate that I can use ? if no , what is the simplier way to do it ?
If the data is very large , I want to create a access db to store it, how to do it ?
I have an on click event to mail a report which works. I want to change the text to include data from a table.
I changed the code to include the field 'office' from the table 'Checks' but get an error saying 'Object required'.
Code is : Private Sub cmd_mailreport_Click() Dim office As Object Set office = Checks.office DoCmd.SendObject acReport, "checks", "PDFFormat(*.pdf)", _ "info@company.com", "", "", office & " Daily Check - " & Date, "Attached is the report for the office", _ True, "" End Sub
I have with my database. It's holds cost data including purchase made in foreign currencies which need to be converted to GBP using the correct exchange rate so a variety of reporting & stats can be performed.I have a table called Costs within which there are 2 fields
Purchase Currency Exchange Rate
I also have another table called Exchange Rates 13/14 within which there are 2 fields
Currency Exchange Rate
When a value is entered in the Purchase Currency field on the Costs table (this is a look up field linked to Exchange Rates 13/14 so it shows the listed currency in drop down) I need the database to automatically populate the Exchange Rate column in Costs i.e. match the value in the Purchase Currency field to the Currency field in Exchange Rate 13/14 and populate with corresponding Exchange Rate from Exchange Rate 13/14.I have tried the following and none work:
SQL Tried
1. UPDATE Costs SET ExchangeRate = [Exchange Rates 13/14].[Exchange Rate] WHERE Costs.[Purchase Currency] LIKE [Exchange Rates 13/14].Currency
2. UPDATE Costs SET ExchangeRate = [Exchange Rate] FROM [Exchange Rates 13/14] INNER JOIN [Exchange Rates 13/14] ON Costs.[Purchase Currency] = [Exchange Rates 13/14].Currency
3. SELECT [Exchange Rate] FROM [Exchange Rates 13/14] WHERE Costs.[Purchase Currency] LIKE [Exchange Rates 13/14].Currency
I know it is possible to have a drop down for Purchase Currency which shows 2 columns (both Currency and Exchange Rate) you can then use the exchange rate figure for a calculated field. The problem I have is that I am importing data into the costs table from excel. In Excel I can only have 1 value in the Purchase Currency column on the upload template. If I just have Euro in this column the database does not match it to the Euro in the Purchase Currency drop down and also store the correct exchange rate.
Or is the alternative to put this into the calculation of GBP Unit Cost where this somehow matches the Purchase Currency in the Costs table to the Currency field in Exchange Rates 13/14 tables and uses the appropriate exchange rate from Exchange Rates 13/14 to calculate GBP Unit Cost in Costs table.
I have staff table which is a lookup field on the phone call table.when the phonecall form opens I want the employee field to auto fill in the employees name from the lookup field according to there security level.so something like this
On Open Select Case Forms!frmLogin!cboUser.Column(4) Case X = 4'the employees security level' Case X = Insert Table_tblPhoneCalls!EmployeeID"4" into Form_frmPhoneCalls!Employee. End Select
of course this is a syntax error as I do not know the correct code words.
I have an input form on which I have a combobox. The user can choose from the list of products. However, I want to use this input in a code and I need the productid to work with in the code. How can I arrange it that when the user selects, they can see the name of the product and the id (not necessarily), but once the input is chosen only the id serves as input and thus in my code I only use the id ( number)??? Stacey
I created a subform that displays the records of a select query after selecting the desired data from a single combo box (for instructors name) and then using an OpenQuery macro attached to a button.
Only 1 record is displayed in the subform each time I hit the button. If I look at the query return there is no change. However, if I close the query and select a new instructors name, although I only get one record in the subform, the query when opened shows all the correct records.
Hi All, I am not sure if this is an easy one or not.. I have a field in a table named Stock_Alias. This field was originally set as a Number field. I have a combo box on a form, which contains the Stock_Alias numbers. When a number is selected, the remaining fields are shown in text boxes. I have had to change the Stock_Alias field to a memo, to incorporate Numbers & Characters. I cannot seem to hit on the right code to get the same results as i did when the field was a number field..
This was the code I was using to select the field as a number...
Private Sub Cmbo_Stock_Alias_AfterUpdate() Dim rs As Object Set rs = Me.Recordset.Clone rs.FindFirst "[Stock_Alias] = " & Str(Me![Cmbo_Stock_Alias]) Me.Bookmark = rs.Bookmark
I have a List Box in a table and it is set to permit multiple items selection from it .
The fact is I can select, as I wanted, multiple items from it through the Form but when I go to the correspondent table to see the results the selected data from the List Box isn't there .
Note all data selected from the List Box is visible trough the Form but not the table .
Has this problem anything to do with mismatch in data type configuration on the table ?
I'll start with explaining what my goal is.. I have a table with workorders, it has a column "date planned" so I can give all the work orders a date when to be executed.
On the other hand I also have a table with the ID of every technician and the dates when their vacation starts and ends, so 3 columns, 1 text, 2 dates.
To link the 2 I use a table "schedule" where I have 4 columns, "ID", "WO", "TechID". WO refers to the workorder nummer that can be found in the schedule table.
My end goal is to have a form with a subform "schedule" where I can see all the workorders in dataview, when I select a workorder in the table I want to fill up a combobox with all the technicians available, so that means that all the ones on vacation on the planned date of that WO are not included in the combobox..
I tried making a select query, but I have no clue how to make a "select ... where (date) is not between ... and ..."
Another issue for my contacts database for work. I have a listbox on the edit contacts form that lists all contacts in the database.
The listbox rowsource is SELECT [ContactID], [LastName] & ", " & [NamePrefix] & " " & [FirstName] & " " & [Business/Organization] FROM tblContacts ORDER BY [LastName] & ", " & [FirstName] & " " & [Business/Organization];
Some of the contacts that are businesses or organizations, do not actually have the first and last name filled in, just the business/organization name. So what happens in the list I get all of the entries that do not have FirstName/LastName at the top of the list, with the Business name following a few spaces. The way it looks is:
, Stop & Shop Supermarkets
But I would like to trim that beginning part if there is no FirstName/LastName so that Stop & Shop Supermarkets gets sorted with the S's, like this:
Stabile, Lisa Stop & Shop Supermarkets Stott, Joan
Is there something I need to put in the rowsource to accomplish this? I've searched these forums for an answer, and turned up no results.
Attached, I have a screenshot of the form with the listbox.
I have a list box which contains data about projects. It has the proNo and proName. I i want to be to select a project and tranfer it to anohter list box on the form using a command button.
I want to be to do this until i have all the projects I want in the second list box. I want to also be able to trnasfer projects back to orginal list box if i make a mistake.
You see this in some databases where the command buttons have < and > to transfer data back and forth.