General :: Delay When Field Is Updated And Form Is Re-queried

Jun 15, 2015

I have a continuous form with an SQL query as its record source, it is a dynaset. Each row on the form is for a specific picture, containing a unique ID, a pre-generated caption field, and an official caption field. The idea is that users will edit the pre-generated caption field, hit a button, then their changes to the pregenerate caption will be made to the value of the official caption field.

My VBA code for the button works fine, in that it doesn't return any errors. The problem is that there is some sort of delay between when the button is hit and when the official caption field is updated. After the first press, the form requeries and the official caption field is the same, but after a second press the official caption field will display the user's changes.

First, a recordset clone is created using an SQL query, the pre-generated caption column is selected and then the results are filtered to the single record that shares the picture ID of whatever row the user was working in. Next, an SQL update runs, replacing the value of the official caption field with the value of the pre-generated caption that is contained in the recordset clone. Then the form is requeried.

I've tried adding a change of focus at the beginning of the code and a 15 second pause between when the update statement runs and when the form is requeried, neither solves the issue. The problem can't entirely be my code, because a second press of the button will make the appropriate changes.

I know what you're thinking, why have divide the captions into pre-generated and official in the first place - why not use pre-generated caption as the caption source? There is a separate feature that allows a user to mass edit captions and I decided to retain the original pre-generated caption as a field, in the event that the user makes a mistake or decides to reference the content of the pre-generated caption.

View Replies


ADVERTISEMENT

Pulling A Field To Match The Min Field That Is Queried

Nov 30, 2005

Let's see how well I can explain this. I'm sure the issue is much simpler than I know but my knowledge is limited as this is all self-taught.

I have two tables:

Table 1:
Category Name
Part Name
# used per house

Table 2:
Part Name
MFR Name
Part Number
Initial Cost
Rebate %
Final Cost

In my form table 2 is the subform as there are multiple manufacturers that we get price quotes from for every part that we use. I'm trying to query for the minimum price for each part but I cannot get it to give back the MFR name that has the minimum price. I currently can only get it to show the minimum price for each part but that doesn't tell me which MFR it is that provides that price.

Also, Final Cost is just the Initial Cost multiplied by the Rebate %. Is there anyway to make it be auto-populated within the table. Currently I'm just running a text box on my form that multiplies the two fields but that leaves my Final Cost field in the table blank obviously.

I have a few other things but figure I'll start here lol. Any help would be appreciated

View 2 Replies View Related

Form Field Value Updated From A Query Result

Jun 15, 2006

Hi

I have a Form called Products. Each product is uniquely identified with a primary key called [ProductID].

Products contains a calculated field called [UnitsOnHand]. [UnitsOnHand] gets its values from a subform called ProductTransaction that exists within the Products Form.

ProductTransaction contains a field callled [Received] . At the moment [UnitsOnHand] will add up all the values it finds on the [Received] field to derive the [UnitsOnHand] value for that product at any particular time ie =Sum(nz([Received])) on [UnitsOnHand] .

I also have a Query AutoSell that outputs a value for each [ProductID].
How can I use these values for each [ProductID] generated by the Query to substract from the values on the [UnitsOnHand] calculated field on the Product form.

ViRi

View 1 Replies View Related

Forms :: Date Last Updated Field In A Form

Apr 6, 2013

I have an Access 2007 database. I have added in a LastUpdated field into my form, which will update when the record is altered. After searching around I was able to find this VBA:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me![LastUpdated].Value = Now()
End Sub

This VBA works, however my problem is that when I try and switch records, using a combo box (which I made from the combo box wizard selecting the "Find a record on my form based on the value I selected in my combo box") I get Run-Time error 2448.

View 3 Replies View Related

Forms :: Copying Memo Field Comments To Other Queried Record

Jan 15, 2015

I have one memo per change (user input)...I need to have the comment the user inputs to copy into other records that were queried. I tried insert. My coding does one of the records or all of the records ..I need it to copy just to the queried records ...and I have a query but no filter set.

View 4 Replies View Related

Tables :: Field Of Table Changed But Dropdown Not Updated In Form

Jan 4, 2015

I Have made a change to a field in my tables. it was was based on ethnic background and originally i had just created the field but had not added in the options ( via adding it into the row sources).

So now the tables field have been updated but unfortunately on the form it has not updated into the dropdown i had created containing the options..

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

Modules & VBA :: Text Field In A Form Updated Multiple Times When Filter Is Applied?

Sep 9, 2013

In my Access 2010 database there is a form with a large number of checkboxes enabling me to select/deselect certain record details.

Each click on one of the checkboxes triggers a VBA routine setting true/false values in one of several tables linked to the main table.

A query over all records is filtered by the true/false values of the linked tables and the resulting set of records is displayed in the (continuous) form.

The header of the form contains a text field with the value "=GetRecCount()" displaying (correctly, but randomly fast) the number of records selected:

Code:
Function GetRecCount() As String
Dim NumRecs As Long
Dim rs As Object
On Error Resume Next
Set rs = Forms![Super Search].RecordsetClone
rs.MoveLast
NumRecs = rs.RecordCount
Set rs = Nothing
GetRecCount = Format(NumRecs, "##,###")
End Function

Now, the funny thing is that each click on one of the boxes results in 1 call of the VBA routine setting table values, but 21 calls (!) of the text field "=GetRecCount()" in the form. I have established this by incrementing a public variable at each pass.

Why a field in a form is updated 21 times when a filter is applied?

View 4 Replies View Related

General :: Updated Database Won't Save

Feb 26, 2013

I am working on a database. I changed some of the data that was already in the database and it saved without any problems - when I reopened the database, the data was still there. But when I try to input completely new data, none of it will save (it is a database of employees and their information). So, just to make it more understandable, when I change one piece of information, it saves without any problems, but when I want to add a new employee together with their information, save it and reopen the database, it is not there.

View 4 Replies View Related

General :: Call Quality Monitoring - Recordset Can't Be Updated?

Oct 10, 2013

I am creating a database for call quality monitoring. Just when I thought everything was working perfectly, I get an error saying the record set can't be updated. I can't find anything useful about it online either.

Here is my database:

I have a table which is essentially an template for call quality. each record has a primary key ID number. I also have a table for staff and their teams which is linked to the other table.

I have a form where you can select the staff member, and there is a tab control where the second tab has their quality results via a sub form. I have made the primary key a hyperlink so when clicked it brings up the quality form of the original record. however it can't be updated and gives me the message saying record set can't be updated.

I want the user to be able to click the hyperlink, bring up the record and edit where required.

Is this even possible?

View 5 Replies View Related

Field Can Not Be Updated

Apr 13, 2005

I have a form based on a query I built that calculates time worked. you select the worker in a combo box which I created from a query that lists all active employees and their clock no. with clock no being the bound column. The drop down shows the workers last name, first name. When I choose a worker it always gives me a warning the the "Field can not be updated" but after i hit okay it stores everything in the correct field. Why am I getting this error? I tried using just my query and it works perfectly but when I try to use my form is where i run into problems. If you need more info let me know.

Thanks, :confused:

View 1 Replies View Related

Last Updated Field

Aug 11, 2005

Is there any way to make a date change to the current date/time whenever something on a report is edited? I have a "Last Updated" field but I want it to automatically update itself.

View 5 Replies View Related

General :: Capturing And Saving User Name Who Created And Updated A Record

Jul 20, 2012

I have taken the Access Tasks template and modified a bit. It now captures and saves the time and date a record is modified. The database is on a network folder and is shared among our team users.What I would like to do next is make it,

1- capture and record on my Tasks table the user name of who created the record by using the fOSUserName() function. I have the table fields "Created by" and the VB code in a module. This would happen only once when the record is created.

I would also like to do this with the machine name for which I have the module too. fOSMachineName()

and,

2- capture and record the user name of who modified a record. For this I also have a field in my task table "Last Modified By" and i hope i can use the same fOSUerNmae() function.

I got to the point where I put an unbounded text box with the =fOSUserName() in it and it does show the user name but how do i get to record to my task table?how the template removes the tasks that are completed from the task list as soon as it is updated to completed? how can I make this happen with a cancelled option after I add it to the drop down list?

View 3 Replies View Related

Updated By User Field

Feb 19, 2008

Access 2000:

There is probabily a simple function that can do this, but I'm stuck to find any explanation so I was hoping someone could help. I've tried the forum search but I guess I'm looking for the wrong thing.

I have managed access to the databse using the users/groups facility. So everyone who accesses the database has to effectively log in.

Users will be creating a record in only one table. When they save this record I need Access to automatically populate a designated field with the Users Log On name.

My question is how?

Thanks in advance for your time.

View 11 Replies View Related

Field Cannot Be Updated Error Message

May 21, 2007

I have a main form with project information and subform with financial information for each related project. Every time I try to add a new record, I get the error message "field cannot be updated". I click ok and it appears again, this continues three times after and then disappears when I click ok. After which I can add a new record. This happens on the query and the form.
Can someone help me through this one? Thanks

View 1 Replies View Related

Auto Change A Field When Another Is Updated

Jul 13, 2006

I have a form where sales can be entered. Whenever a [salesdate] is entered, I would like the [status] to automatically change to "Sold". How can I go about doing this?

View 1 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 :: Adding New Record - Field Cannot Be Updated

Aug 31, 2013

I have a form based on a mysql table. There is a button in the footer to add a new record.

The pertinent vba code: DoCmd.GoToRecord , , acNewRec

It adds the new record and properly places the cursor in the first field. Immediately after the first letter is typed, the error message "Field cannot be updated" pops up. I can click ok and the message goes away and I am able to continue filling in the fields. The same thing happens if I add the record by use of the record selectors.

View 14 Replies View Related

Forms :: Check Box Checked - Field Cannot Be Updated

Sep 27, 2013

I have created a user form that contains check boxes for various fields, and on this form, when the box is checked, I get a prompt that the field cannot be updated. I have several other forms that use these same yes/no fields, and I am not having the same problem on these forms. I checked the property sheet row source for the form and I don't see anything wrong with the select statement (that I know of).

View 1 Replies View Related

Modules & VBA :: Get Last Updated Value Of Excel File In A Field In Access

Mar 18, 2014

Some vba code which is able to get the last updated or last modified value of an excel file stored in a folder in a shared drive and update a field on a form in ms access.

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

Queried Reports

Nov 24, 2007

Hi,
Would you humour me for a moment while I explain my query problem.
I work in Air Freight at Heathrow where all consignments are processed under an Airwaybill (AWB), an eleven digit number where the first three digits (prefix) denotes which airline the freight has travelled with. For security reasons a lot of the freight is X-Rayed and I am designing a database to log these shipments. Sometimes freight will arrive at Heathrow on one airline and then travel on to its' destination (this is called a transhipment) on another having first been X-Rayed.

What I want to do is produce end-of-month reports for each airline detailing which of their freight has been X-Rayed. I have created queries which filter the data for each airline according to the first three digits of the AWB, simple. On the data entry form I have a combo box which allows the operator to select which airline the freight has transhipped on. My problem is in the query where I have used the Or operator to "catch" these records e.g in the United Airlines report where the prefix is 016 I have all the records that begin with this prefix plus those that went on this airline but also those that went on a different airline but have the 016 prefix. It is these last records that I only want to appear once on the report of the airline it finished its' journey with.:o

View 5 Replies View Related

Job (ID) Number Range - To Be Queried?

Jun 11, 2007

Hi all,

I'm building a quick database, but some of the data to go into the database is quite... odd...

Anyway, the point is, I have one sheet that says

"Job Number 1200-1245" which would have all the same details, dates, etc.

Is there a quick and easy way to put in a range, say J1200-J1245, enter the data once, then be able to query... for example J1212 would return the same data.

Cheers :)

View 1 Replies View Related

ID Changed When UNION Queried

Aug 18, 2006

Hi all,
I have a UNION query of multiple tables:

Select * From tblCal_SlsAB
UNION
Select * From tblCal_SlsBC;

Both of them have Unique IDs as PK, such as: AB001, AB002, etc for tblCal_SlsAB and BC001, BC002, etc for tblCal_SlsBC. When I do the UNION query I get: 1, 2, etc for both IDs instead. What's causing the ID to change and is there a workaround it? I need to get the same exact IDs I have in those individual tables. Thanks in advance!

Max

View 5 Replies View Related

ID Changed When UNION Queried

Aug 18, 2006

Hi all,
I have a UNION query of multiple tables:

Select * From tblCal_SlsAB
UNION
Select * From tblCal_SlsBC;

Both of them have Unique IDs as PK, such as: AB001, AB002, etc for tblCal_SlsAB and BC001, BC002, etc for tblCal_SlsBC. When I do the UNION query I get: 1, 2, etc for both IDs instead. What's causing the ID to change and is there a workaround it? I need to get the same exact IDs I have in those individual tables. Thanks in advance!

Max

View 2 Replies View Related

Box That Shows When A Form Was Last Updated

Aug 19, 2005

I wondering if anyone knows of an automatic way that changes can be tracked on a form.

Ex. The last time a record was updated in that specific form

View 2 Replies View Related







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