Continuous Subform That Retrieves Data From One Table And Saves To A Different Table

Mar 8, 2012

I have a Traits table that has fields TraitKey and Trait and I'm looking for the subform to show one record for each trait so that I can give the employee a score for each trait.

I'm trying to save that score in an EmployeeTraitScores table that has the fields EmpID, Trait, Score.

If I bind the subform to the traits field, the continuous form shows each one properly but then I don't know how to save to the scores to the EmployeeTraitScores table.

If I bind the subform to the EmployeeTraitScores table then it can save a record but I can only get the Dlookup to show the first trait.

View Replies


ADVERTISEMENT

Forms :: Continuous Subform - Validate Data Before Saving To Table

May 18, 2013

I have a continuous subform that displays lots of questions. This specific form has 10 questions on it. Each question has one answer and the users are required to select one answer for each question. I am trying to do some data validation before the data gets saved to my table to ensure that users have answered all the questions. I found some very useful code online and tweaked it to suit my needs. The validation works perfectly on subforms with only one question, as I have some other tabs that use it.

On the specific form that has the issue, the validation works as expected when no question has been answered, but when a user answers only one question and leaves the remaining nine questions blank, the validation does not work. I guess it is as a result of the continuous form repeating the different questions and ms access thinking that the data entered for one question alone is complete when it actually isn't.

Code:
Private Sub Ctl4_frm_Staff_Exit(Cancel As Integer)
Dim ctrl As Control, EmptyStr$
For Each ctrl In Form_subFrm_staffQuestion.Controls
If InStr(1, ctrl.Tag, "Required") > 0 Then
If IsNull(ctrl.Value) Or ctrl.Value = vbNullString Or Len(ctrl.Value) = 0 Then

[Code] ......

View 1 Replies View Related

Forms :: Continuous Subform Based On Same Table As Main Form

Jul 4, 2013

i'm creating a database which holds all animals. i'm trying to make the parents selectable in a subform based on the same table as the main form - this doesn't work for whatever reason ("table is already opened exclusively by another user,..."). it can't just be one field or a query, it needs to be a subform because besides name and eartag i also want to display a small picture of the parent and only the filename is being stored.

i'd really like it to be selectable records in a continuous subform, so the risk of selecting a wrong id is minimized. is there a way around this not being able to use the same table for a subform?

View 14 Replies View Related

Modules & VBA :: Continuous Form With Data From Table - Populating Listbox From Recordset

Nov 28, 2013

I'm trying to populate a listbox from a recordset. I will explain what I'm trying to achieve.

I have a (continuous) form with some data from a table. On the form header I have a listbox, showing all (distinct) customers from that form.

The user is able to do some filtering. That all works great. But I want to populate the listbox with ONLY the customers on the form AFTER filtering.

One way I thought might me the solution was using RecordClone. But I'm stuck there. It must be something simple for an expert. I'm not entirely a newbie, at least not to VBA. Is there an easy way to refer the listbox' recordset to the actual recordset on the form?

View 1 Replies View Related

Modules & VBA :: Exporting Data To Excel Template But Saves Under Different Name

Apr 29, 2014

I am able to use DoCmd.TransferSpreadsheet to export data from Access to Excel, however, I want to be able transfer data into a specific sheet within an Excel template (e.g. Tasking.xls), that will then save under a different name (e.g. Tasking 20140429.xls). The other sheets within the Excel template contain pivots etc. so they will need updating during this process. The Excel template should just close down and remain in its original format.

This process will occur once a week so the dates will have to change accordingly.

View 7 Replies View Related

Copying Data From A Linked Subform To A New Table

Dec 3, 2005

I have linked a SQL table to my ms access database. In order to view the SQL table as read-only and still be able to update the access table I have setup a form with a subform.
I know it would be a dublication of data but is there a way thru code of copying the data on the subform to my access table. I was hoping I could put a button on the form that would copy this data. My idea is after the copy is done all the information I need will be in my access table. I'm new to this linking idea and am worried I will only have half the information I need if the link breaks etc.
Thanks

View 1 Replies View Related

Forms :: Populate Data From Table To Subform

Nov 29, 2013

I want to append/populate all data from one table to subform?

It is possible?

I managed to populate data from one table to another but my relations between form and subform isn't good, because record that is supposed to be filled as the "link master fields" is left blank.

View 3 Replies View Related

Tables :: View Table Data On Subform?

Jan 1, 2013

i have a table that holds "course codes" with the corresponding Module title and module codes, and assessment titles and codes that are used in each of the courses, so I have a few records that will go against one course code. I have forms set up with subforms, with the same general details on the top of each as the main details, and each of the subforms giving different information. But, for four of my subforms, I need to pull information from this table with the module title, module codes, assessment title and codes. possible to have these certain columns appear across four subforms, and what is the best way to go about it, I was thinking of using lookups?

View 1 Replies View Related

Forms :: Subform Not Saving Data Into Table

Nov 5, 2014

I have a subform which is for payment, it has a calculated field which is called TotalPayment, with expression:

=Nz([Forms]![Reservations2]![Days]*[Forms]![Reservations2]![Rate],0);

in the control source. When a value is displayed in this field an ID number should be assigned to the PaymentID field, but this does not happen, the field remains null.

View 1 Replies View Related

How To Insert Subform Data To Specific Table

Oct 1, 2013

I have problem with inserting sub-form data to specific table. i have 2 table and one form.

table A is for DLOOKUP, table B is the table i want my sub-form data to insert in.

my table A have ID,name and class.

my table B have ID and other column.

Table A' ID and Table B' ID is related.

i trying to insert my sub-form to table B instead it insert the data to table A.

View 1 Replies View Related

Modules & VBA :: Save Subform Data To Temp Table

Jul 2, 2013

I have a MainTable with Subform. The Subform is based on a Query. I want to save the data/Fields from subform to my TempTable..

MainTable Fields:
EmployeeNo
Name
Position

TempTable Fields:
ID*
Salary
Allowance

Subform Fields:
EmployeeNO (not Shown on Query results)
Salary
Allowance

I want the fields in my subform to be saved in TempTable..

View 4 Replies View Related

Forms :: Save Calculated Subform Data To Table

Oct 20, 2014

What I'm trying to do: I have created an unbound field within a subform's footer to calculate the average of the displayed record values. The subform is in datasheet view. The records are returned based on a query with a relationship between two tables. I need the calculated data (which I currently have displayed on the main form) to populate within the master table.

I can't figure out how to automatically do this. I created a simple command to get it there, but I'd like the user not to need a button to display a calculation.

Main form based on TableA; subform based on TableB.

Here's how I have it set up (Btw, I suck at SQL I just figure this is easiest to read):

Query SQL looks like this: SELECT tblB.Field1, tblB.Field2 FROM tblB.Field1 INNER JOIN tblA ON tblB.Field1 = tblA.Field1

Main form: unbound txtbox = [Forms]![frmA]![subfrmA].Form.[txtAvg]

The field that is averaged is tblB.Field2. There are potentially a bunch of records displayed in the subform.

I need that [txtAvg] field to save to TableA. My command button is simply Me.tblA.FieldName = Me.unboundtxtbox. I'd like to do away with that.

I tried to use the on current or on load event for the main form; but the calculated field value is 0 until it calculates it. It seems like there is a short delay before the value shows up on the form at which point the on current or on load events don't pick up the calculated value; just the 0 that is initially there.

View 5 Replies View Related

Tables :: Datasheet View Of Table Inside Subform Not Showing Sorted Data

May 25, 2015

I have a linked table(tblxyz) having property set as ORDER BY ID DESC, ID is autonumber, so my table view gives me latest record on top.

Now I have a subform , where i am calling this Table.....

[Forms]![MainForm]![Sub_DisplayFm].SourceObject = "Table.tblxyz"

This gives me datasheet view of the table inside subform but its not showing sorted data

Interesting thing is it give sorted data view when my table is not linked and is in same access file.

View 4 Replies View Related

A Continuous Form And Continuous Subform, Possible?

Aug 9, 2005

What I am trying to do is put a subform within a subform. The trouble is I want both forms to be continuous forms.

when I put the subform within a subform, access comes up with the following message:

************************************************** ********************
A form with a subform object cannot have its DefaultView set to Continuous forms.

You tried to add a subform to a form in design view.
MSAcess will reset the property to Single Form.
************************************************** *********************

which it does my higher level form becomes a form only showing single records at a time whilst the subform is a continuous form.

does anyone know of a way around this?

what about Access2003 does it allow this?

help much appreciated.

Steve Ferry

View 8 Replies View Related

Continuous Forms And Querying Another Table

Jan 23, 2006

I have a continouus form that queries a table and displays various fields on the form. For each record in the master table displayed on the continous form I also need to show the result of a calculation in an unbound field.

The calculation needs to be based on the Count of the rows of a particular type in another table. This other table will have many different types of record - and I have a query that returns the count. This query is based on a SQL WHERE clause that is fed in a value from a field in the master table. To be concret a field in the master table has the name ID_component. This field has to be then used in the query to determine how many rows in this other table has a type of ID_component. From what I can tell right right now is that the query which is triggered from a combo box in the form is not getting the ID_component value on a record by record basis.

My question therefore is whether using continous forms one can get an unbound field to do a query on another tabel when the query has to be fed in a parmeter from a field in the original tabel?

If this is not possible - any ideas on how I can achieve something similar to I can obtain a count of rows and feed it into a continous form

thanks in advance

John

View 6 Replies View Related

DLookup Function To Load Information From Table To Another Table Using Subform

Mar 22, 2013

I have 3 table table; Invoice table, Product table and Sale_product table. Sale product table records all sale from the product table

Invoice table has these fields
ID
TOTAL
CASH_TENDERED
CHANGE

Product table has

ID
CODE
QUANTITY
NAME
PRICE

and Sale_Product table has these
ID
PRODUCT_CODE
QUANTITY
PRODUCT_NAME
PRICE
SUBTOTAL
INVOICE

I did main form from Invoice table and sub form from Sale_product table. I want to use DLOOKUP function to load the name and price, quantity and calculate subtotal automatically from the product table based on the product code entered. i have being trying hard and i keep on getting "Name? error"

View 1 Replies View Related

Forms :: Selecting Record In Parent Subform From Child Continuous Subform

Jan 26, 2014

I have two subforms on a main form. Both use similar queries and nearly the same set of records and PK. The first subform is for data entry and the 2nd subform is a continuous form that lists the entries in order that are made from the 1st Subform. (for entering in vacation days and appointments)

The continuous form cannot be edited, it is to be a list for viewing the information only.

I have an edit button next to each record on the continuous form. When the button is clicked, I want it to take the 1st subform to that specific record as well (same PK), so the information can be edited there.

I cannot figure out how to get the 1st subform to go to the record on the continuous form when the button next to that record is clicked on the continuous form.

I tried the DoCmdSearch for record and just keep getting object is not open errors.

View 2 Replies View Related

Forms :: Run Query From Continuous Form That References Table

Jan 31, 2014

I have a table called Tbl_Query_List that houses the query names that I want to be displayed on a continuos form. I want the user to select the query by highlighting it in the continious form and then having a command button at the bottom of the form.

I have everything setup including the command button. Assuming that on the EVENTS tab I set the OnClick to [Event Procedure] but when I click on the ellipsis what do I type to make it run the highlighted query?

View 10 Replies View Related

Can Documenter Print Table Definitions On Continuous Pages?

Apr 24, 2015

I have several tables and the default layout is one table per page. In some cases, there are a couple of fields...a waste of paper. Can this be changed?

View 1 Replies View Related

Forms :: Rota Table - Continuous Type Form In Tab Control

Oct 23, 2013

I am mid way through a Access db and have a solid idea what i want from a form. The idea is for a rota display and edit form.

a tab control with 5 tabs (-2 weeks, -1 week, current week, + 1 week, + 2 weeks) and when the user clicks it lists all the employees (Employee Table) with any found rota entrys (Rota Table) populating into a text box type table with employees information blank where no rota information has been entered.

then the user can edit / add shift information from that table and hit save.

the main rota information is inputted by an excel import but this is done once a month and adhoc changes will be needed (holidays absence etc)

the only thing i found like what i want is a continuous form (which ive never used before but been told that wont go in a tab control)

How i would accomplish this (code snippets - doesnt have to be detailed just the fundamental functions so i can add modify to suit the information the sql's i already have its just the form controls.)

View 3 Replies View Related

Forms :: Storing Small Icons In A Table For Use In Continuous Form

Nov 29, 2013

I searched without success for a solution to show small pictures (icons) in a table field to show up in a continous form.

Purpose is:
a communication log table has comm codes such as
- mail out
- mail in
- tel call in
- tel call out

the comm log table has the fields
CustomerID, datetime, CommCode

The CommCode table hast the fields
CommID, CommCode, Icon

The form (subfrm) should show in continous form mode to each customer..Datetime, (commCode), and to visualize the Commcode the small image (icon) presented by an envelope with an arrow right, an envelope with an arrow left, etc.

I cannot find a solution for storing those little images and retrieving them from an OLE-Field.All my other pictures I do not have stored in the tables, but only the image path, but for that I would prefer to store them directly into a table field as they do not blow up the database.

View 1 Replies View Related

Modules & VBA :: Check If Data In Table 1 Matches With Any Of Data In Table 2

Dec 4, 2014

There are two tabs named Table1 and Table2. In actual there are two tables in Access database named Table1 and Table2. How the data is stored in ACcess tables, I have made two tabs in excel workbook. Now I want Access VBA code that will check if data in Reference field of Table1 matches with any of the data in Reference field of Table2.

If it matches then change the status of the corresponding record of Table2 with either "Withdrawn","Obsolete" or "Updated". SO it depends upon which field out of "WIthdrawn","Obsolete" and "Updated" in Table1 stores "Y". At a time only one of them will have "Y" and rest of two fields will have "N" as shown in the sheets.

As in the example, now Reference "R566" of Table1 matches with Table2 Reference so the status field in Table2 for that record will be "WithDrawn".

View 14 Replies View Related

General :: When Transfer Data From Table In Excel To Table In Access / It Loses Format

Jan 29, 2015

When I try to transfer (ctrl c + v) data from a table in Excel to a table in Access it loses format.

Exemple: $ 1.000,00 (Excel) become 1000 (Access).

I need to keep the format to make sure that the code works properly.

View 9 Replies View Related

General :: Copy Data From Local Access Table To Linked SQL Server Table?

Jan 13, 2014

I have an MS Access accdb with linked SQL Server 2012 ODBC tables. I am working on a procedure to copy data from local tables to these linked tables (identical schema). I did a simple

Code:

DoCmd.RunSQL "INSERT INTO linkedTable SELECT * FROM localTable"

This works, but is very slow. Way too slow. (INSERT copies the data one record at a time).

I would like to copy the data in a bulk operation, or operations that I can execute programmatically.

View 1 Replies View Related

Making Form Open With Data From A Table Based On Date And Time In Table?

Sep 12, 2014

How to make a form open with data from a table based on a date and time in the/a table?

View 7 Replies View Related

Extracting Data From Linked Db2 Table Using Access Make Table Query

Aug 29, 2006

Hi,
I am extracting data from linked db2 table using access make table query. First I create a select query and can view the linked db2 data, but when I change to a make table query I get an error message, "invalid argument", when I run the make table query. There is no selection critera specified. Has anyone had this happen? and Do you know a solution?

Thanks for your support
GinnyP

View 1 Replies View Related







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