Form With List Boxes Won't Populate Underlying Table

Oct 10, 2013

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.

View Replies


ADVERTISEMENT

Populating An Underlying Table When Using Cascading Combo Boxes In A Form

Jun 1, 2005

Hello everyone

I have read the FAQ on cascading combo boxes and have managed to apply the theory to my DB's data input form (frmDataEntry) which is very cool and prevents a lot of errors however in doing so it no longer populates the underlying table (tblProductionDetails).

I am at a loss as to how to correct this as you can see from the example I need the customer and description field to be populated with the correct data rather than the fields I am using to make the cascading combo boxes work.

Any help would be greatly appreciated

Regards

Adrian

View 3 Replies View Related

Populate List Boxes When A Form Field Changes Value

Nov 28, 2005

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

View 5 Replies View Related

Using List Boxes To Populate Tables

Nov 9, 2006

Hi all,

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.

Many thanks in advance!

View 4 Replies View Related

Updating Table Field From A Form W/List Boxes

Oct 31, 2005

This is my first post, but I've been lurking for sometime. I'm grateful for all the great advice given here; despite my efforts, I can't find anything directly related to what I'm doing, though.

I have a form that is populated from a query. The query has some calculated fields and some direct selection fields from a couple of tables. One of the direcly selected fields is one that I'm trying to populate from the items in a list box.

On this form, there are two list boxes, List1 and List2. The user makes selections in List1 and clicks a command button, which runs code so that the second list box is populated with the items from List1. This was shown here:

MS Article (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office03022000.asp)

I actually just used this code and made changes accordingly so that this feature is working perfectly. However, the items in List2 need to be updated into a table's field, and this is where I'm having the problem.

I've got List2 bound to the proper field in the query, and I can manually run that query and make changes in that field fine. What I can't figure out is why I can't get the ItemsData property of the List2 control in there. For ease of code, I've added a line that copies the List2 rowsource variable to another variable so that the values can be used elsewhere. I can't seem to get the field to receive the variable in VBA, and I can't figure out how to get the values back into the query so that the query's source table is updated.

Any clues? Or is this unclear? I'm happy to give any further information. I've been working on this for more than a week, trying different things, and I'm at wits' end.

View 3 Replies View Related

Forms :: Add Record To Table From A Form Using Unbound List And Text Boxes?

May 14, 2013

I have a form with 1 unbound listbox as drop down list (entypolst), an unbound text box(entypotxt) and a command button. The list box reads items from a table. I want to change a value (text) on listbox, input a text on textbox so pressing the button add a new record in a table (Table1 fields Category,Product) showing in my form as subform (SFTable1) in datasheet view. For that reason a made the following code:

Code:
Private Sub AddBtn_Click()
Dim ans As Integer
Dim strSQL As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim ctl As Control

[code]....

I take the error msg for 0 items selected in listbox and exit the sub.

View 7 Replies View Related

Underlying Table For Form|Sub-form

Jul 13, 2005

(original thank-you below...)
sorry, more stupid questions: I want the underlying table for the mainform to have the little column with the "+" you can press to see the related subform data. I created the two tables and then created a related form and subform, but the underlying table does not show the "+" column)??

HUGE thank-you for the response MStef - the example was helpful ! I will start again with 2 tables instead of one.....(I had thought i wanted to have all the info on one underlying table for viewing and printing purposes, but, I guess its not necessary). Thank-you!
SR

View 1 Replies View Related

Populate A List Box With Table Names & Table Data

Feb 27, 2008

I have 2 questions/problems:

1. I want to populate a list box with all the Tables Names in my Database using VBA.

2. I also want to create another List Box or Grid (or any thing that will show table data) that when i have select a Table Name (See above (1)) it will show all the data in that table in the List Box. Was thinking some kind of SQL using vba to populate the list box?

Any ideas or help will be much appreciated

Richard

View 1 Replies View Related

Modules & VBA :: Populate List Box With Table Names

Jul 10, 2014

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")

[code]...

View 5 Replies View Related

Entering Information On A Form To Populate Remaining Open Text Boxes

Dec 18, 2014

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?

View 1 Replies View Related

List Boxes On A Table.

Apr 26, 2005

Hiya guys,

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?

Many thanks
Tim

View 3 Replies View Related

Forms :: Populating Invoice From Underlying Table?

Jun 14, 2015

As simple as it sounds. I have set up a table with a list of items and the costs. I then created a form with a list comprising 10 combo boxes. I want to be able to select one record from the underlying table per combobox on the form.

I am able to do this but the records in the underlying table keeps switching to the primary key field as I go along using the combobox.

View 8 Replies View Related

Filter Split Form Using List Boxes

Jan 5, 2015

I've set up a split form for data entry on a form called "frmqryTask" that once opened, I'd like to be able to filter using list box controls.I've set up a couple of different reports with cascading list boxes to only pull in the information wanted on the reports and would basically like "more or less" the same functionality within a split form. I know I could do this before the form is actually launched using the same cascading list boxes, however the users need to easily by able to filter once inside the form. (I tried to show a couple people how to filter on the bottom section on a column called "SourceName" and they would up changing the values. SourceName is linked to another table as a combo box thru the lookup wizard in the table setup.)

There will probably be three different list boxes to allow for different filtering based on the combination of the values for;

1) SourceName
2) SourceNameType;
3) SourceNameStatus.

View 2 Replies View Related

Update Combo Box When Change Made To Underlying Table

Feb 24, 2005

I have a form with a Combo box, populated from table A. From this list, the user can select a item for data entry into table B. If the desired item is not found in the combo box, the user can launch another form that will allow the item to be added to table A. However, when the user returns to the data entry form for table B, the new item doesn't appear in the combo box.

I saw this problem addressed in another posting, but the solution (which required code behind an Exit button) will only work if the data entry form for table B is open :eek: . So, if the user wants to only do data entry into table A, an error will be raised when they try to exit.

Other than creating a seperate data entry form strictly for table A, is there an easier way to update the combo box on the entry form for table B?

Thank you!!!!!!!!!!!

View 1 Replies View Related

Forms :: Combo Box Populating Underlying Table Incorrectly?

Mar 9, 2015

I am using a form with a combo box (FieldExpenses) that lists from a query row source (SELECT statement). Whether entering a new record or editing an existing record on the form, the selection in the combo box populates the field in the underlying table (TableTransactions) with the row ID (ex: 105), not the desired field (ie: Telephone).

I tried using a split form and the table in the form shows the field correctly. If I open the underlying table separately, the field displays the row ID. It's not working as I wish.

View 2 Replies View Related

Auto Lookup In Query Not Updating Underlying Table

Jan 6, 2012

I have created a 'junction' table between 2 many to many tables:

Jobs table (details all jobs)Jobparts table ('junction' table details Job ID, Part ID, quantity and unit price)Stock table (details all stock).The fields Job ID, Part ID and Unit price are each lookup fields from the corresponding fields in the jobs and Stock tables with quantity being a manual entry. This works fine.

I discovered you can automatically populate the unit price field using autolookup based on the entry of the Part ID field on the form. However having amended some pre-existing jobpart details randomly on the form when I checked back to the table they had not updated. Similarly when creating new entries while the form 'unit price automatically updated on entry of the 'Part ID' these details did not feed through into the table.

I assume it has to do with how the table was originally set up the field properties will need to be changed.

View 7 Replies View Related

Access Requery Of Underlying Form

Nov 17, 2011

This seems pretty simple but I would like to select a combo box and after the user selects the combo box (Which Is a City) I want to use the underlining query of the form to run because I am using the <>False Criteria for a command of;

IIf([Forms]![frm_Deals]![CheckCity]=True,[City] Is Not Null Or [City] Is Null,[City]=[Forms]![frm_Deals]![SelectCity].[Value])

I may have other combo boxs with other information so that is why I want to run the underlying query. I have used the After Update command of;

Me.RecordsetClone.FindFirst "[XXXX] = '" & Me!FindXXXX & "'"

But I want to requery the query under the form.

View 1 Replies View Related

Creating A Windows Wizard Style Form (list Boxes)

Feb 8, 2006

I am currently creating a database to link together a maintenance system and a conditional reporting system and I’ve run into a little problem.

I am trying to create a form for assigning skills to a given contractor (contractor selected via a combo box (cboContractor)) by transferring selected items from a list box on the left (lstAvailable) to a list box on the right (lstselected). (much like any windows wizard would) This is done through the 4 buttons cmdSelect, cmdSelectAll, cmdDeselect, cmdDeselectAll.

Now it has been a long time since I have had to work with VB and I am struggling a little to create the required coding to pass data from one listbox to the other.

For reference:

CboContractor takes information from tblContractor. The data is ContID and ContName and the bound column is 1.
LstAvailable takes information from tblSkills. The data is SkillID, SkillComm and SkillNotes. Bound column is 1
LstSelected will place data into tblcontskills.
Tblcontskills has the fields, tcsID, ContID, SkillID

Can anyone help or does anyone know where I can find some good examples on the net as I have browsed through the search pages here and not really found a great deal that is valid

Thankyou in advance for your help everyone

View 2 Replies View Related

Modules & VBA :: How To Make A Calendar Form With List Boxes Having Two Columns

Jul 19, 2013

Runtime Error 3075? I have attached a copy of my database. I am trying to make a calendar form with the list boxes having two columns. It works fine with the strFieldID and strFieldName but when I try adding the strDone I run into the error.

View 6 Replies View Related

Forms +List Boxes +Text Boxes With Formulas

Nov 8, 2004

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.

Thanks,

Lester

View 3 Replies View Related

Forms :: Text Box Search On ID And Populate Other Text Boxes In Same Form

Nov 12, 2013

I am trying to search on EmployeeID field and populate corresponding data like EmployeeName, EmployeePay in other text boxes in the same box .

In my Unbound Form I have three unbound Text Boxes and one Command button:

txtEmpID
txtEmpName
txtEmpPay
cmdFind

In my table EMPLOYEE i have three fields

EmpID -- Autonumber
EmpName -- Text
EmpPay -- Text

View 2 Replies View Related

How To Populate List Box With Another List Box Using Extended Multiselect

Nov 23, 2012

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.

View 1 Replies View Related

General :: Obtain Totals From Two Columns In List Box Into Text Boxes On Main Form

Oct 27, 2012

I am trying to obtain totals from two columns in the list box into text boxes on the main form, but my third argument is not working as expected.The source of one of the tex boxes is:

Code:
=DSum("Airtickets","T_Training_Participants.ProgrammeID=Me.lstParticipants")

I want to sum only amounts of the records that equal or belong to a selected programme (ProgrammeID) in the bigger list box above.

View 2 Replies View Related

Use Multi-select List Box To Filter A Report With Two List Boxes

Nov 20, 2013

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

[Code] .....

View 14 Replies View Related

Forms :: Get Main Form To Accept Changes Made To Underlying Subform?

Sep 24, 2014

I'm trying to resolve a problem with a form displayed as follows

MainForm
-->SubForm1 embedded in main form
--->SubForm2 embedded in SubForm1

When I edit subform2, then return to the mainform and edit a field on the mainform, I get an error.

'The data has been changed. Another user edited this record.... Re-edit the record.'

My understanding to resolve this is to do a requery. So I added:

Me.Parent.Requery
Me.Parent.Parent.Requery

as part of the LostFocus event for subform2. However, I now get a Write Conflict error when returning to a field in the main form. I get a dialog box with the option to Copy to Clipboard or Drop Changes. I can select Drop Changes and it will let me edit the main form afterwards.

This is Access 2010 over SQL. how to get the main form to accept the changes made to the underlying subform?

View 8 Replies View Related

Forms :: Embedding Image In Form Not Linked To Underlying Data

Jun 28, 2013

I have a form that I call the AdminForm. It allows the user to store administrative information about the business; business name, address, telephone number, etc. I also have as a part of the table that stores this information an Attachment Field where an image of their logo is stored in a field called, [Logo]. No problem here. The issue is that I want to use the [Logo] field elsewhere like in reports.

I've added an Attachment type control to the report and I've used DLookUp to use the image stored in the admin table, but it doesn't display on the report. There isn't any relationship between the admin table and any report so I can't join them unless I do something "unnatural" by adding a fictitious field to every record to tie it back to the key field in the admin table, (there is never more than one record in the admin table; I ensure that). That doesn't seem like the right way to accomplish this.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved