Filling A Table Using Combobox On A Form

Feb 26, 2005

I have a basic design question that I am not sure how to address.

I am trying to build a simple data entry database with a form to take input from the user, store the values in a table. Once the data is gathered into the table I want to use this table to print a report of each record (entered using the form before).

To achieve this objective, I made a form (frminput) with some text fields. Most of the fields on this form are Bound fields to a query (qrymaster). One of the field is a Combo box (whose value is shown from another table). I have designed the RecordSource of this Form to be a Query (qrymaster).

This is a basic Data Entry form where the user selects the Combo box item and based on what he selects, some of the fields in this Form gets pre-filled. The rest of the fields on this form are bound to the query "qrymaster" and the user has to type these fields manually.

Now, I want a Save button here that would save all the values on this form to the table "tblmaster". How do I do this efficiently keeping in mind all the normalization laws on the database?

At this time, behind the Save Button, I have included a SQL statement to insert all the field values into the table "tblmaster".

I am sure there is a better way to do this. Can someone point me in the right direction please?

Thanks.

View Replies


ADVERTISEMENT

Filling Multiple Columns In A Table From One Combobox?

Oct 22, 2014

I know how to have multiple columns fill a lookup in a combobox both from a table and a query. But I need to have the other fields that aren't saved by the combobox saved in the neighboring columns. So, my primary table is a master list of chemicals to be analyzed along with their respective registry numbers. I know what most of the programmers say about repetitive data being bad form etc. These names and registry numbers will NEVER change, so I'm not worried about a change causing problems later. I'm trying to build a separate tables that will have specific chemicals and the methods that they are analyzed under that effectively copy from the master list, but add their own quality control criteria. Further more, not all of my clients need all of the chemicals that are available for every method. It should be noted that not all chemicals are analyzed by the same methods and that some methods will have some of the same chemicals as others. I need the registry numbers because this is what the analysis software uses to uniquely identify each chemical and I need the name because names are easier for me. Long story short, I need both of these pieces together. It was suggested to have a macro copy the remaining columns from the dropbox in the table to the other columns in my table, but I'm not sure how to do this (I'm still very new to Access and my VB is very rusty). I understand how to do this for a form, but when client reporting lists become involved later on, this will make my database very bloated to have a form to populate each respective table.

View 1 Replies View Related

Modules & VBA :: Filling Combobox With SQL Data?

Oct 6, 2014

I have a select statement (AlphaName and StaffName are variables) in a module that woks fine, its been tested with a basic insert. what i want to do is get this result into a combo box without creating another table?

Code:
strSQl = "SELECT [Week No] FROM [" & AlphaName & "_Hours] WHERE [Alpha Name] = '" & StaffName & "';"
Me.Week_Cmb.RowSource = strSQl

View 7 Replies View Related

Modules & VBA :: Filling Combobox Dynamically

Jul 24, 2014

I have been spending all my today to fill a combobox dynamically, but have not been able yet.

I have a combobox and a pass-through query in access, which is working fine and fill the details into the combobox via data source. Now what I am planning to do is to update the combobox source as soon as value in a text box changes.

here is the code I am using, but it is not working:

Dim rs As Recordset
Dim qDef As QueryDef
Set qDef = CurrentDb.QueryDefs("get_data")
qDef.SQL = "SELECT Initial + ' (' + Name + ')' uws FROM EM.dbo.UW" _
& " WHERE lob = '" & addSingleQuotation(Me.CMB_LOB.Value) & "'"

Me.cmbUM.RowSource = qDef.SQL
Me.cmbUM.Requery

I also used Recordset, but did not work:

Set rs = CurrentDb.OpenRecordset("get_data")
Me.cmbUM.RowSource = rs!uws

View 2 Replies View Related

Filling Up A Table From Another

May 23, 2007

Hi all:

I have an inventory table, and I wish to pick items from that inventory table and populate an order placement table.

In oracle, clicking one of the item windows in the form provide with a LOV (List of Values), and usually items are picked from there.

How do I achieve this in Access, and it does not have to be LOV as in Oracle.

I shall be thankful for your kind help.

Regards - Prabir.

View 4 Replies View Related

Filling Table?

May 30, 2005

I have a table:

Product:
Code | Name | Description | Price

I have a form with a text box. i want whatever i write in the text box to be inserted in the table Product under Code.
Its like im inserting a new product.

How can i do that? Im new to Access and VB, so bare with me.

Thanks alot

View 1 Replies View Related

Filling A Table Using Combo Box

Dec 21, 2004

I have one table (tblComplete) with a listing of 30-50 company names and associated information...

"tblComplete" has fields: AutoNumber, Company, Address, City, State, Zip, Phone

On a form I created a combo box linked to AutoNumber and Company to drop down the list. Once the 'company' is selected, I would like it and the rest of the fields (address, city, state, zip, and phone) to go into the blank table (tblSelected).

Could I use a Macro to do this or should it be a query?

View 9 Replies View Related

Tables :: Filling Some Table Data From Another Table

May 14, 2015

I currently am working on a small inventory project. I have a table with the fields "Part Number" which is my primary key, "Description", "Cost", and "Sale Cost". I have a second table that I would like to use to keep track of purchase orders. It has the fields "Part Number", "Description", "QTY", and "Cost". I would like to be able to open purchase orders and be able to select a part number from a combo box that pulls "Part Number" from my item list.

So I can enter items in to my item list and later when I do purchase orders I can go to purchase orders select my item and have it automatically fill in the description and cost in my purchase order. If the item does not exist I can enter in the item in to the item list table. At this point i'm not worried about a prompt to enter in new items if they don't exist in the item list table. I just want to my Purchase Orders table to be able to autofill description and cost by selecting a "Part Number".

View 2 Replies View Related

Using A Combobox On A Form To Select Table

Jan 23, 2014

I am trying to use one form to manage multiple unrelated tables that share the same field names (i.e. SKU, Name, Description) . My goal is to utilize a combobox or listbox to choose which table the data is sent to.

View 5 Replies View Related

Filling In A Column Using Data From Another Table

Jan 20, 2015

I have a list of 4300 clients. The clients' personal information and ID numbers are listed in the table BasicInformation. Another table, DiseasesAndValues lists 17 diseases and a "scheduled value" (long story short - an amount of money) for each disease. Each client has one of these 17 diseases. I would like to have a column in the BasicInformation table which shows the scheduled value for the disease that a particular client has by going back to the DiseaseAndValues table and checking to see what the scheduled value of their disease is. Alternatively, I could use a query that could enter in these values with a click of a button.

View 2 Replies View Related

Filling A Table Field With A Query Result

Nov 23, 2004

I have a query_ReimburseResult
that counts the yes/no answers in field Reimburse from tbl_Survey.

How do I take the results from the query and put it into a field in another table?

I have tbl_Result and a field called ReimburseResult. I set the type to long integer and then what?

thanks!

View 2 Replies View Related

Filling A Form

Dec 5, 2005

hi
is there anyway to temporarily store the information being entered into a form before actually writing it to a table. i want information to be added to the table only once the save button is pressed. i dont want the table to be used even as the scratch pad.
Thanks

View 3 Replies View Related

Filling In A Form

Feb 11, 2005

I have a form, which is used to create proposals. The form has form headers and footers, as well as a page footer.

In the Detail area of the form there are only two fields, Description and Amount, which only take up one line. I want the detail area to determine how many pages the form will be when printed. Can a new description/amount fields line be automatically inserted after I complete one? I guess the question is, can the Detail area of the form grow automatically? If so, how is it done.

Naturally, I only want the Form Header and Footer to be printed once, regardless of the amount of pages the proposal becomes. And, likewise, I want the page footer to be printed on each page. So, if the detail area only has one line completed then only one page will be printed. However, if there are 20 lines in the detail area then two pages or more will be printed.

Any help would be greatly appreciated.

MrAviator

View 1 Replies View Related

Selecting Existing Table Name Using Form's Combobox For A Query

Dec 12, 2006

Folks,
can someone help me on this? I am not sure why the select query inside this procedure is not working. Here is the that routine:

Public Sub temp()
Dim strDocName As String
Dim strTableName As String
Dim strTbl As String
Dim aot As Access.AccessObject
Dim strSQL As String
Dim rpt As Report
Set rpt = CreateReport

strTbl = Forms!frmSearchBoilerGuar!cboTypeOfGuar

For Each aot In CurrentData.AllTables
If aot.Name = "strTbl" Then
strTableName = strTbl
End If

Next aot

strSQL = "SELECT tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, " & _
"strTablename.memGuranItem , strTableName.memLDs FROM tblProjts1 " & _
"FROM tblProjts1 LEFT JOIN strTableName ON" & _
"tblProjts1.intProjectId = strTableName.intProjectId"

rpt.RecordSource = strSQL
strDocName = "rpt"

DoCmd.OpenReport strDocName, acPreview
End Sub


Basically, I am trying to select a table name from the combobox and then use that table name for my query. Then I want to use that query as a recordsource for my report.

Any help is greatly apprecited.

Shan.

View 2 Replies View Related

Forms :: Subform Not Filling Required Info Into Table

Mar 15, 2013

I have a database which has been in production for quite a few years, it even made the swap from .mdb and .accdb without losing any of the functionality. Well I just had to export from access to new access to start a new file for one of our projects and now one of the subforms is not adding information into the table. The way the subform functions is it feeds information to the table Lease Tracts, at the same time it has another table Xrf Property Tracts Leases (I didn't pick the name and it drives me nuts too!)

When a user starts to add information into the subform the table lease tracts generates an auto number "tracref" which it adds onto the line where the user is inputting the rest of their information. The relationship is set as all alike between xrf and lease tracts to input in both tables, well the xrf lease num1 is being filled in by the master/child setting but the lease num1 on the lease tract is the only field not autofilling.

View 3 Replies View Related

Filling Form And Emailing It

Jun 9, 2005

I have a form that the user will fill, then email it to a customer.
I dont want to send the whole table, just the values that the user just inserted in the form.

Any idea on how should i do that using Access?

I am aware of the SendObject method, but i never used it, and dont know how. Any help will be very apreciated.

Thank you in advance.

View 2 Replies View Related

Automatically Filling Linking Fields For New Rows In Related Table?

Dec 18, 2012

OK, so I have a database with four tables (Well, more than that, but these are the relevant ones). It's to be used for recording the results of site inspections.

"Tbl_Typicals" is a list of products. We'll call its key "Typical_ID".
"Tbl_Actions" is a list of tests performed on each product. A given product may have many tests, but each test applies to only one product. Its key is "Action_ID". Each row contains a Typical_ID to link on.
"Tbl_PlantComponents" records which products are installed on which site. Its key is "Component_ID". Each row contains a Typical_ID to link on.

The fourth table ("Tbl_Results") contains the results of each test. As a result of the relationships above, each row is specific to a single Action which applies to a particular PlantComponent, which is to say, each row has both a Component_ID and an Action_ID to link on.

So, what I need is a query that pulls all of these together, such that I can use these details as the line items of a subform.

The main form displays the details of the PlantComponent, which is a simple query to relate line items in Tbl_PlantComponents with the data about that particular product in Tbl_Typicals. So far, so easy.

The subform shows the details of each test applicable to that product. It then has toggle buttons and a comment field to indicate the results of the test, the results of which should be stored as a line item in Tbl_Results.

The "easy" way is to use an append query to generate Tbl_Results in advance. This works, but it raises a variety of new issues.

The nice way would be to use a normal SELECT query and have Access fill in the necessary linking fields (the Action_ID and Component_ID) on each row automatically. Now for trivial examples, this is very easy - my main form query manages just that: I created a link between Tbl_PlantComponents and Tbl_Comments (which stores general comments about each PlantComponent which aren't related to a specific test) based on the Component_ID and that works fine - when I edit the Comments field, the row is automatically created and the linked ID field filled in for me.

However, when I need to do it with 2 links, it all falls apart. I've tried everything I can think of, including generating a single-column unique ID to use for the link, but Access just won't autofill for me. It just makes those fields on the form (or in the datasheet view of the query) non-editable because there's no associated row in Tbl_Results. If I create a matching row in Tbl_Results the query works fine, but that's not the point.

Implementation of the query is non-trivial because it requires two outer joins involving 3 tables - All from Tbl_Actions to matching in Tbl_Results, and All from Tbl_PlantComponents to matching in Tbl_Actions. This necessiates splitting the query into two - the first relates Tbl_PlantComponents, Tbl_Typicals and Tbl_Actions (returning one row for each Action for every Component), and the second performs a single outer join (using an AND) between the first query and Tbl_Results.

View 5 Replies View Related

Data Transfer By Filling A Form

Mar 3, 2006

Dear All!

I'd like to ask you to help me in the following. The issue is basic I think, but not for me...

I'd like to transfer the data entered in the fields of a form into the fields of a table (that uses the same values). This table is connected with one to one relation to the table which the form bases on.

(An automatic data-transfer would be desirable. If it is difficult a button will do as well.)

Please write if you have got any good idea or solution.

Thanks in advance.

BR
xxyy

View 2 Replies View Related

Filling In Report Header With A Form Value

Jun 15, 2013

I currently have a form that will simply display the values from a query, which was called by a form. What I want is for the header (a text box) in the report to have the value that the user selects from the form that calls the report. Also, when the form calls the report, it only prints it off. I would like to know how the form can just display the report instead.

View 1 Replies View Related

Forms :: Combobox In A Form To List Values Of A Field In A Table - Rowsource

Apr 14, 2014

So I have a combobox in a form that lists the values of a field in a table. The rowsource is this:

Code:
SELECT [Estes Training Modules].[Training Module], [Estes Training Modules].[Period] FROM [Estes Training Modules] ORDER BY [Period];

The problem is that ALL values on that field show up, including repeated values. I only need each different value to show up once. How can I do that?

For example, what I get in the combobox is: Annual, 2-Year, Annual, Annual, 2-Year, 3-Year,...

What I need is: Annual, 2-Year, 3-Year,...

View 10 Replies View Related

Using Combobox Name Selection In Login Form To Update Fields In LoginEvent Table

Apr 23, 2013

I have a login form with a combobox which derives its list of values from an EmployeeRecord table (i.e., last name, first name, securityID, job grade and record number): only the last name and first name appear in the list. (I swiped some VB code for a multiuser login form and routine from several previous posts.)

After it performs the security validation/authorization, it then opens a navigation control form based upon the user's job grade. It runs after the click button event. To this I would like to update another table, LoginEvent, with the last name, first name and record number from the combobox selection, and also add the time and date of the click.

View 2 Replies View Related

Access 2010 Selecting Data From A Table And Auto-filling Fields

Aug 14, 2015

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.

View 1 Replies View Related

Forms :: Combobox On Navigation Form Header - Query Table To Show Right Info

Mar 24, 2013

I created a navigation form on which I put a form call [frmAnimal Setup].

I then placed one combo box on the Navigation frm Header. I have bound it to its source and it actually queries the tbl and show the right info. However when I select one, it will not let me.

In addition, [frmanimal setup] will not allow me to select a breed although it does query the tbl and shows the right information.

View 1 Replies View Related

Forms :: Filling Multiple Date Fields In The Form With First Value

Mar 3, 2015

I have a table where I use 3 date fields in, all with different views.

Field 1: Date as dd/mm/yyyy
Field 2: Quarter: q (shows the same date, but then as quarter of the year.
Field 3: Year: YYYY

Now I have a form that fills all of my fields, but is there a simple way () to populate the other two fields Quarter and Year from the value I entered in Date?
So if I change Field "Date", Fields "Quarter" and "Year" updates as well.

Maybe I don't need to do it in the form, but in the table?

I'm not that good with VB- scripts, and I'm not sure If it is possible to auto populate the table field Quarter and Year directly in the table itself.

View 7 Replies View Related

Forms :: Access 2010 / How To Retrieve The New ID During Filling The Form

Sep 23, 2013

Access 2010 frontend, SQL-Server 2008 R2 backend

During filling a form, I generate a code which should include the ID of this record.

But the ID is not available before update of the form.

If I save the record before all fields mandatory are filled, i get an error of course.

How can I manage this and get the ID "earlier"?

View 3 Replies View Related

General :: Recording Information In Form - Filling In New Fields Based On ID

Jul 26, 2012

I have a form to record student information. On my student table i have a school I.D that links to the primary key of my school table.

My problem is that in my form, i want to be able to fill in the rest of the fields about the school info based on the I.D chosen.

i.e.

student table:
Student id
name
address
school I.D (FK)

School info table:
School I.D (PK)
school name
contact name
email
address

My form that's linked to the student table needs all the information from the school info table in separate fields
but i can only select School I.D in the Control Source Property.

View 1 Replies View Related







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