SubForm Not Showing Updated Data

Jul 5, 2006

This one is driving me NUTS! I have a form with a combobox, a few textboxes, and a sub-form.
On Load the form is populated with a sql command/rcSet.Fields() results.
The user then chooses a status from the combobox to narrow down the results. The combobox OnChange event looks like this...
sDate = Forms("frm-MENU").txtS_Date.Value
eDate = Forms("frm-MENU").txtE_Date.Value
xJob = Forms("frm-HD/DVR_CC").lstJob.Value

On Error GoTo hd_dvrErr
'this gets the top of the HD/DVR form
sSQL = "SELECT Count(*) AS Total, Sum(IIf([pmt_meth] In ('C','E'),0,1)) AS Error, Sum(IIf([pmt_meth]='C',1,0)) AS [Credit Card], Sum(IIf([pmt_meth]='E',1,0)) AS EFT " & _
"FROM [tbl_HD/DVR_CreditCard(*)] " & _
"WHERE ((([tbl_HD/DVR_CreditCard(*)].CDATE) Between #" & sDate & "# And #" & eDate & "#) AND (([tbl_HD/DVR_CreditCard(*)].JOB_TYPE) Like '" & xJob & "*'));"

Set db = CurrentDb()
Set rcSet = db.OpenRecordset(sSQL)


With Forms("frm-HD/DVR_CC")
.txtTotal.Value = rcSet.Fields(0)
.txtError.Value = rcSet.Fields(1)
.txtCC.Value = rcSet.Fields(2)
.txtEFT.Value = rcSet.Fields(3)
End With

'this gets the bottom or subform of the HD/DVR form
sSQL = "SELECT IIf([Agent]='UNKNOWN','xxxxx',[REP]) AS [Agent ID], [tbl_HD/DVR_CreditCard(*)].Agent, [tbl_HD/DVR_CreditCard(*)].JOB_TYPE, Count(*) AS Total, Sum(IIf([pmt_meth] In ('C','E'),0,1)) AS Error, Sum(IIf([pmt_meth]='C',1,0)) AS [Credit Card], Sum(IIf([pmt_meth]='E',1,0)) AS EFT, Sum(IIf([pmt_meth] In ('C','E'),0,1))/Count(*) AS [Error Rate] " & _
"FROM [tbl_HD/DVR_CreditCard(*)] " & _
"WHERE ((([tbl_HD/DVR_CreditCard(*)].CDATE) Between #" & sDate & "# And #" & eDate & "#)) " & _
"GROUP BY IIf([Agent]='UNKNOWN','xxxxx',[REP]), [tbl_HD/DVR_CreditCard(*)].Agent, [tbl_HD/DVR_CreditCard(*)].JOB_TYPE " & _
"HAVING ((([tbl_HD/DVR_CreditCard(*)].JOB_TYPE) Like '" & xJob & "*')); "

Set qdTemp = db.QueryDefs("qry_HD/DVR")
qdTemp.SQL = sSQL
qdTemp.Close

If Not Forms("frm-HD/DVR_CC").FormFooter.Visible Then
Forms("frm-HD/DVR_CC").FormFooter.Visible = True
Else
'DoCmd.Close acForm, "frm-HD/DVR_CC(Footer)", acSaveNo
End If
DoCmd.OpenForm ("frm-HD/DVR_CC(Footer)"), acNormal, , , , acHidden
Forms("frm-HD/DVR_CC(Footer)").Recalc
Forms("frm-HD/DVR_CC").Refresh
Forms("frm-HD/DVR_CC(Footer)").Refresh
' DoCmd.MoveSize Height:=Forms("frm-HD/DVR_CC(Footer)").WindowHeight + Forms("frm-HD/DVR_CC(Footer)").FormFooter.Height



exit_hd_dvrErr:
Exit Function

hd_dvrErr:
MsgBox Err.Number & "-" & Err.Description
Forms("frm-HD/DVR_CC").FormFooter.Visible = False

Resume exit_hd_dvrErr


End Function



I have used similar code on another form and everytime the search criteria changes the sub form updates to reflect such. I know I am missing something small; can somebody please point it out?:D
I need to have the subform show the updated (choice from combo) criteria.

If this seems to cloudy, please let me know and I will try and revise

View Replies


ADVERTISEMENT

Forms :: Table Updated But New Records Not Showing In Form

Jul 15, 2014

When I add new records to the form and close the form, the tables are updated with the new records, but the new records don't show in the form (navigation).

View 14 Replies View Related

Split Database Not Showing Updated Drop Down List Entries

Jun 4, 2014

I have a database that is split - one central PC holds the back end, and then there are multiple end users with a copy each of the front end.We have updated a drop down menu on a field in the back end to add some new entries, but this is not showing up on the front end copies.Is there an easy way of updating the front end to show the changes?

View 3 Replies View Related

Forms :: Subform Not Showing Data

May 27, 2015

I have two forms. The first form has individual data to include the person's Social Security Number (SSN). I have another form (subform) that has other data to include the person's SSN. I added the subform to the form (linked the SSN). Unfortunately, only the SSN field appears in the subform. None of the other data in the subform appears in the subform.

View 6 Replies View Related

Forms :: Subform Not Showing Data?

Dec 5, 2013

I have a Subform that is inside a Subform that its only purpose is to display some calculations but for some reason it is blank. Here is a screenshot of what I am dealing with:

See that area under "Pump Calc" that is blank...it should have data in it:

Here is the query that drives that data:

And here is a copy of that subform running in form view:

What am I missing?

View 6 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

SubForm Updated From ListBox

Sep 20, 2004

I have subform which uses a SQL statement as the record source.
One of the criteria (ie. Part of the WHERE condition) is a column value from a ListBox on the MainForm.

Two problems exist:
1. When the MainForm opens, I get a "Enter Parameter Value" window, asking me to input
the value it should be getting from the ListBox. (I suppose this is fair enough, as the ListBox hasn't been
created/populated yet!)
2. When the ListBox is there, when I click on a row, I still get the "Enter Parameter Value" window!
-I'm using a Requery on the Subform's control on the MainForm when the row is clicked.
-A MsgBox within the OnClick event, is giving me the value that the SQL statement should be using!
But the Subform doesn't seem to want to 'see' this value.

Any suggestions?

Thanks.

View 5 Replies View Related

Forms :: Field On Subform Cannot Be Updated

Jan 25, 2014

I have created tables to capture information from a form (see attachment for relationship diagram).

I have created a form with a subform based directly on the tables. Entering data in the main form works fine but when I try to add a record on the subform I receive the error: "Field cannot be updated". Clearly I have made a mistake creating the table relationships.

View 7 Replies View Related

Forms :: Update Parent Form After Subform Updated?

Mar 30, 2015

Parent form/table, with a subform (separate table, 1:M link on "ID") The parent form data stays fairly constant (occasional change/update), with multiple entries in the subform for each parent record which are added to more frequently The master table has a field "last interaction" which I need to update whenever a new entry is made in the subform/subtable It updates fine when I change an entry in the parent table/form, but not when I add a new subentry for that parent

View 12 Replies View Related

Forms :: Timestamp Record When Field In Subform Updated

Jun 16, 2014

I have a form and a subform based off a query, I am trying to run a SQL update statement from one of the fields in my subform. I know what fields in my table i want to update but the Where part of the statement is what i am having a issue with.

DoCmd.RunSQL "UPDATE [Daily Work] SET [Daily Work].QC_Start_Date = Date(),
[Daily Work].QC_Start_Time = Time() WHERE ((([Daily Work].CUS)=[Forms]![QC_Queue_Qry Subform]![CUS])
AND (([Daily Work].LN)=[Forms]![QC_Queue_Qry Subform]![LN]) AND (([Daily Work].Note_Date)=[Forms]!
[QC_Queue_Qry subform]![Note_Date])))"

What this is trying to do is once the the field is updated i want to set the date and time of that record in my table, basically I am trying to time stamp the record when the field in my subform in updated.

View 4 Replies View Related

Forms :: Subform Doesn't Update After Values Being Updated By Another Form

Feb 27, 2015

I'm running into an issue with my forms. I have a form that contains a subform, that contains a list of projects. This list is read-only. To update a record, you can double click on it, which opens another form filtered on this record, and which contains the fields in the first form as well as some others.

I have a command button on that last form to "Save and close", which fires up a macro that saves the record and closes the window.

Now, the issue that I'm having is that, when the window closes and I'm once again in front of the first form with the list of projects, the values of the record I changed are not updated and when I click on another record, Access tells me there's a conflict in the values and asks me if I want to keep the changes, discard them or copy to the clipboard.

It seems to consider the old values from the first form as a change, and thus asks me which to keep between these, and the actual (proper) changes I made in the dedicated form.

For the proper changes to be applied, I need to select "Drop changes".

I tried to requery the first form, also undo the changes to it after closing the window, but none of that worked.

I'm actually basing this on one of the templates, which does exactly what I want and which obviously works...

View 3 Replies View Related

General :: Keep Old Field Data For Report After Data Updated

Dec 31, 2012

I have a database with a form called "Main" where users input data and then print a report from it. "Main" has fields in it from another form "Members". This data (from "Members") is shown on "Main' by Dlookup coding, and therefore cannot be selected for input by the user. Now, lets say a user inputs data into "Main" and prints the report on 12/30/2012. On the next day, a member's name is changed and I update that data in the "Members" form. On 12/31, I would like to print the report again, but it shows the updated member's name instead of what is was like on 12/30. How can I keep the old data in case I want to print the report in the future like it was initially printed? What do I need to do to any form(s), report or what VBA code needs to be written?

View 3 Replies View Related

(999)#000-0000 Data Needs To Be Updated

Nov 29, 2004

Hey guys im stuck on this one.
I need a fax # to be changed from 1 format to another.
i dont even know where to start any help would be appreciated.
the original data is already in a table like so; (999)#000-0000
and i need on my final table or query all the records to be:9990000000

I have been stuck on this one all weekend long, can it be done.
thank you.

View 9 Replies View Related

Not Allowing LINKED Data To Be Updated

Jul 27, 2005

I have a very simple database used by 3 users at a time. It is split into BE and FE. One user accesses the DB with queries only so I have created a DB with the master file linked - and literaly nothing else, She will then create and save all of her queries here. But - I want to keep her from accidently updating the file from here. I can't seem to find a simple solution to simply not allowing her to update. Any ideas? Thanks - Dika

View 3 Replies View Related

Archiving Data Each Time It Is Updated

Jun 27, 2005

Hi, I have a form which is made up for 3 tables and I am trying to create an append query for each one in order to keep records of data before it is updated. The append queries seem to work but they append all data rather than just one selected record. I know I will next need to create a macro which can be used each time a record has been updated and a copy is sent to the archive. Can anyone help me with this, or have any useful suggestions?

Thanks.

View 2 Replies View Related

Finding Out The Last Time Data Was Updated

Jan 31, 2006

Hi,

I am using this code below to retrieve the last updated time on the tablea.


lbl_DataLastUpdated.Caption = "Data last updated: - " & Format(CurrentDb.TableDefs("ATM_Info").LastUpdated, "dd/mm/yyyy hh:mm")


This works but the problem i have is, when i add an entry via a form or do anything else via a form. This does not get updated?. I check the properties of the table and that isn't either.

When i then modify something manually in the table (go in and change it). It then updates.

Is there something im doing wrong or is there a better way to check the last updated.

Thanks
k0r54

View 3 Replies View Related

Repeated Queries And Updated Data

Sep 13, 2013

I am running repeated calculation queries of different data, but its is not working to well. I have one query listing the total number of hats made from wool. I then have a second query of that lists the total number of hats made from wool and are black. I have third query that calculates the percentage. I have many different hats of many different colors, and i am doing the same three queries over and over. However, the calculated field for percentages does not update. E.G. I have 100 wool hats, 10 wool,black hats, 10%. The next round: i have 100 wool hats, 5 wool green hats, its will still show me 10%, as its is still calculating based on the previous data. how can i go about this most efficiently and why is not updating?

View 1 Replies View Related

How To Get Switchboard To Show Users When Data Was Last Updated

Jun 13, 2014

I maintain a shared database that I would like other users to be able to see when the data was last updated when they open it so that they can see how up to date the information is from the switchboard.

Currently I am doing this manually by updating the date in a label on the switchboard header, but ideally I would like to add a final action to my update macro (that imports new data into the database) that would automatically do this for me on completion if possible.

View 4 Replies View Related

How To Detect When Data In A Linked Table Is Idepenently Updated

Mar 17, 2008

I have developed an application using MS Access and MySql tables.
The Access forms maintain/display orders that are stored in the MySQL linked tables. The MySql tables can also be updated independently by another process. The problem is that the Access forms do not reflect the backend changes when they are made by the other process.

For the moment I have implemented an on Timer process that causes a requerys for the forms every 5 seconds but this is not very elegant and causes the form screens to flicker.

Is there a better way I can automatically make the front end forms reflect changes to the back-end database when it is updated indepenently ?

View 4 Replies View Related

Retreiving Updated Records Old Data In Access File

Apr 18, 2008

Hi,
I have a VB6 application talking to Access DB. The program was suppose to do some audit tracking but due to a bug it didn't create data in Audit table. Is there a way i can retreive data which is updated (Old values) for 2 tables.
If there is a tool/utility i can buy please let me know.

Thanks

M

View 6 Replies View Related

How To Import Data From The Original Two Tables To New Updated Database

Apr 28, 2014

I've been making small changes here and there to my database in Access 2013. I have left the original database in place and it has acquired many new records from the last month. I'm ready to start using the newly updated design version of the database, but I do not want to have to type all those new records into the new database to get it up-to-date. There has to be a way to import the data from the original database to the newly updated one.

Most, If not all of the fields have the same names, but some of the fields have changed, like to Combo boxes. I removed two or three unneeded fields, and added two or three. I understand the new fields will need to have data enter to them, but the remaining would be redundant and inefficient if I have to reenter all the recent records again.

How do I import the data from the original two tables to the new updated database? I only have two tables and they use a One-to-One relationship in both databases. The table's names are different, but as I mentioned earlier, the fields are mostly the same. Do I need to import into Excel, and then modify the data slightly, and then import into my new database?

View 2 Replies View Related

Subform Showing Wrong Records

Sep 12, 2005

I have a form "Training", with a combo box that holds employee names and a subform with all of their training records linked by "EmployeeID". Quite often lately, when the user selects their name from the combo and the code below runs, someone else's records appear in the subform. There doesn't seem to be any kind of pattern, ie. the previous employee on the list or the next, etc.

Private Sub Combo6_AfterUpdate()
' Find the record that matches the control.

Dim Rs As Object

Set Rs = Me.Recordset.Clone
Rs.FindFirst "[EmployeeID] = " & str(Me![Combo6])
Me.Bookmark = Rs.Bookmark

'Forms!Employees![Combined Subform].SetFocus


End Sub

I have the db split with both the FE and BE on the server and a batch file that runs from a link on our intranet. The table that holds all of the data is at 3,195 records and the db is just under 4MB. I compact/repair regularly.

There are 66 users - usually 3-4 concurrently.

Is it time to think about moving the BE to SQL or Oracle?

Thanks for any help you could offer.

Toni

View 5 Replies View Related

Forms :: Subform Not Showing Records Sometimes?

May 19, 2014

I have a subform that displays records from a query. Usually, there is no issue. Sometimes, though, the subform stays blank for no apparent reason.

Observations:

-Open form and select relevant information (subform stays blank)

-Open query and 1 record is present

-Go form layout view and turn "Data Entry" on, then back off

(The form appears to refresh when this setting is changed and the subform is displaying the 1 record properly now)

-Close form, re-open, and select the same information as before (subform, again, stays blank)

Again, the subform usually displays the records just fine. It's only sometimes that it has this blank issue even though records are present in its source query. I've tried refresh and requery macros on the form and subform, but that doesn't get the information to show up (though, switching "Data Entry" on and off does).

View 7 Replies View Related

Showing A String Query Result In A Subform

Sep 19, 2005

I have a dinamic SQL string built by a function, and i want to assign it to a query to show it in a subform.
Here are the names.

Form FrmServiciosAfectados
Subform subFrmcnsServiciosAfectados
Query cnsServiciosAfectados
Built SQL String strSQLPuertosCanales

Please help me with code.

View 2 Replies View Related

Subform Showing Information From Current Form

Oct 28, 2006

I have a form that shows a subform at the bottom which displays all the corrsponding jobs so that an individual can make the current master form display the specific job information. My problem is I would like the subform list not to display the current master's job as one of the listed ones.


Example:

I have made an order for today and tomorrow. Im looking at the order for today and I see the list of all the jobs I did which is two on the subform. I would like the subform not to display today's job since I am already in it.

View 4 Replies View Related

Reports :: Subform Only Showing Last Group Record

Feb 25, 2014

I have one query that the main form is based on and another query the subform is based on.

I linked the subform to the main form by a common field "Branch"

My main form displays Grouped Employee overhead totals based on Branch

Example:
Branch 1 Employee overhead cost...........15,000.00
Branch 2 Employee overhead cost...........25,000.00

The subform displays grouped branch expense overhead totals based on Branch

Example:
Branch 1 Branch expense...........125,000.00
Branch 2 Branch expense...........155,000.00

I am trying to display both the employee overhead total and branch expense in the Branch Header of the mainform.

Example:
Branch 1 Employee Overhead...15,000.00 Branch Expense...125,000.00
Branch 2 Employee Overhead...25,000.00 Branch Expense...155,000.00

I tried using an IIF statement in a text box in the mainform branch header section to return the branch expense if subform branch = mainform branch.......When I run the report I get all of the Employee overhead but only the last record for Branch 2 branch expense displays.

Example:
Branch 1 Employee Overhead..15,000.00
Branch 2 Employee Overhead..25,000.00 Branch Expense...155,000.00

Then, I tried just putting a text box in the main branch header subreportName.Report.TotalField

When I run the report it returns all employee overhead with the Branch 2 total for every branch in the mainform...

Example:
Branch 1 Employee Overhead..15,000.00 Branch Expense...155,000.00
Branch 2 Employee Overhead..25,000.00 Branch Expense...155,000.00

View 4 Replies View Related







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