Forms :: AfterUpdate Move Value To A Table
Jul 12, 2013
I have a form with a combox control that is bound to a table. It is a status field. When the status changes, I would like to take the OldValue of both the status combobox and the status date and move them to a table that when accessed will show a history of the prior status and corresponding dates.
View Replies
ADVERTISEMENT
Aug 19, 2004
I know what I want to do...but have no idea how to get started! I'm new to coding and using macros and quesries doesn't seem to help.
When field [TermDate] is updated with a value, I want to move the record from table [BadgeData] to table [Termed]. I'm sure this is easy for someone who'll be willing to throw out a few suggestions.
Also, is there anywhere in the code builder that will help identify what code (or commands) do? (Does that make sense?)
View 5 Replies
View Related
Oct 21, 2013
I have an afterupdate event that is supposed to send an email when a box is updated. Most of the times the code works fine except for one case.
The code checks the value of a field in subform in another tab of the same form
Code:
'find the MSM date
[Forms]![Project Main]![Marketing Specialist Main]![MSMDate].SetFocus
MSMDate = Nz([Forms]![Project Main]![Marketing Specialist Main]![MSMDate].value, "__-___-__")
This field (MSMDate) keeps its value in a separate table.
The problem comes when there is no value in this other table for the given project. If this is the case, the subform does not even appear on the main form (it is all a grey box) and the Setfocus returns an error.
I tried to comment the setfocus line to see what the NZ function would do in the next line and it also returns an error.
It is almost as if the subform was not "initialized" for that particular record...
How can I account for those cases?
View 4 Replies
View Related
Aug 20, 2014
I have a combo box, 'Type' that has two values - "Instrument" and "Equipment".Another combo box control, 'Criticality', has an Enabled = False value set OnCurrent.
When the user selects "Equipment", Criticality goes Enabled = True and when OnUpdate to "Instrument", Criticality goes Enabled = False.The Criticality field correctly displays and switches off if someone selects Instrument.
However, if someone puts a value in whilst Type is set to "Equipment" and then Type is reset to "Instrument" and in the meantime the user has selected a value for Criticality, the value stays 'stuck' in the Criticality box, despite the field being disabled. It is a bound field.How do I purge any contents stored in Criticality when the field is disabled? I presume it's something like an SQL statement to set the value to null, but I'm not quite certain.
View 1 Replies
View Related
Jul 15, 2014
So I have a bound form with the following onload code:
Code:
'Add the percent completed to lblPercentCompleted by calling the function
Dim Completed As Double
[code]...
This works fine and set the caption and color of a label on this form.On this form I have several (now only a few, but in the end probably 40 controls or so) which will get updated by the user. When any of these controls are updated, I want the label lblpercentCompleted to get updated with the propper caption and color, however I am having trouble doing this.
I have an afterupdate event on each control with the same code as the onload code, however the message box below appears but the label does not update.
Code:
Private Sub TransferDieCutsOn_AfterUpdate()
MsgBox "Updating Label"
'Add the percent completed to lblPercentCompleted by calling the function
Dim Completed As Double
[code]...
View 6 Replies
View Related
Aug 8, 2013
Here is my problem
In namefield_AfterUpdate, I check for duplicate name entries and notify the user if any are found - they are prompted as to whether the duplicate was accidental or intentional and continue working. This works fine for normal circumstances.
However, if the user updates namefield so that the value is a duplicate of an existing name in the database, but then presses Cancel (or Delete), then the namefield_AfterUpdate is fired and what button they pressed. The button Click code does not run first.
How can I tell if the user updated the name, but then realized they didn't want to save, and then clicked 'Cancel' (or any button) and the code should really skip the duplicate check validations/messages?
Running XP or Win7 with A2007
View 3 Replies
View Related
May 8, 2013
In ACC2010: A subform has a control for date of birth with an AfterUpdate Event. When the date picker is used to populate the control the user must either click outside the control or press the tab key to trigger the control's AfterUpdate event. This event runs some calculations, the results of which are stored in a separate table. When the calculations are finished and focus returns to the form, the form's state depends on whether a keypress or a mouse click was used to trigger the event.
The form's state is indicated by whether calculated controls on the form are empty - mouse clicks leave contents as before the event, tab causes the contents to disappear. In addition, if a keypress is used the user must click twice to trigger the form's BeforeUpdate event. A single click is required to trigger that event if a mouse click occurred after using the date picker.
How to get thekeypress to behave the same as a mouse click?
View 2 Replies
View Related
Jun 18, 2015
I have a form that has a Combo box record selector which works fine. I need to add more to the Where condition of this macro.
Combo1 - Options 1-Facility, 2-Physician (referral_type)
Combo2 - Record selector that works, either shows a list of facilities or list of physicians.
Macro SearchForRecord - Where Condition ="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0))
Would like it to be
="[fac_id] = " & Str(Nz([Screen].[ActiveControl].[Column](0),0)) AND [referral_type] = Me!Combo2
Have tried a few different things with no luck.
View 5 Replies
View Related
Aug 24, 2013
I have a form with 7 types of weights (7 textbox rows) showing 7 weights in kgs and the others in lbs.When the user update any weight-kgs textbox, the opposite weight-lbs textbox will be updated automatically, and viceversa.Now, I'd like a fast way to code this action without writing the After Update_event for every textbox (they're 14).I have already setup textbox tags differently with "WeightKGS" and "WeightLBS", thinking about using "for each ... next" statement, but I have some problems to resolve what I want.
View 4 Replies
View Related
Nov 24, 2006
Ok my problem is this......
I have a form with a field "Property Status" on it. It has 4 possible values -
"C - SHELTERED (with warden charge)";"H - SHELTERED (No warden charge)";"J - WHEELCHAIR SHELTERED (With warden charge)";"M - WHEELCHAIR SHELTERED (No warden charge)";"X - DISCONNECTED"
When the value "X - DISCONNECTED" is selected in the form I want the record to be removed from its existing table and sent to a new table which keeps all the "X - DISCONNECTED" records together.
Any ideas would be greatly appreciated. How would this be coded?
View 1 Replies
View Related
Sep 20, 2006
Well I have two tables, one is the workorder register and the other is the closed work orders. This is for maintenance. I have a form for creating and veiwing workorders. I need to link a command button to the form that will delete the record being viewed in the WO REG table and paste it in the Closed WO table. I think I need to use two append queries but have no idea what I am doing. Here is what I have so far.
INSERT INTO [CLOSED WO] ( WO, MMCN, TECH, NOMIN, FUALTS, TYPE, [SECTION], CLOSEDATE, OPENDATE )
SELECT [WO REG].[WO], [WO REG].[MMCN], [WO REG].[TECH], [WO REG].[NOMIN], [WO REG].[FUALTS], [WO REG].[TYPE], [WO REG].[SECTION], [WO REG].[CLOSEDATE], [WO REG].[OPENDATE]
FROM [CLOSED WO], [EQUIP REG] INNER JOIN [WO REG] ON [EQUIP REG].[MMCN]=[WO REG].[MMCN]
WHERE ((([WO REG].[WO])=[WHAT WO TO CLOSE?]));
Like I said I have no idea what I am doing, this is out of the SQL view for my "move to closed WO" query. the fields I need to move are WO, MMCN, TECH, NOMIN, FUALTS, TYPE, SECTION, CLOSEDATE, and OPENDATE.
Is this even remotly right? I know nothing of VBA an all these symbols mean nothing to me.
View 4 Replies
View Related
Sep 8, 2006
ok ive read some responses to people having trouble or need to know how to move a record from one table to another...
i have two tables. One with member and another with thier siblings.
i have two forms. one with the member details which contain a command box to open the other form for their siblings. the siblings form is a tabular form so when i double clikc the siblings form i can all the children but when i open it from a specific member only their children are shown.
each member has a memberID (primary key). but the siblings have the same ID as their father(member)
i have put a commmand box in the siblings form next to every sibling. what i want is that when i click this button the record moves to the members column.
i only know the very basics of VB...so a step by step explination would be helpful...
this is very specific and if more information is required please ask here or ask for my msn address.
Thank you in advance
View 4 Replies
View Related
Apr 17, 2015
How to update unbound textbox on main form from unbound textbox in subform afterupdate.
that is when amount paid is updated it automatically updates total paid, balance etc.
View 2 Replies
View Related
Mar 26, 2008
Say i have two tables
1 = computers (it holds info about the computers)
2 = Repair (this table holds only the PCs that are under repair)
I want to be able to move one computer record to Repairs table as soon as i select that "this pc is under repair" on a form. So it does not show up on my report of computers in hand and shows up on computers in repair.
and when i get the pc back from repair, i want to be able to select "back in stock" and it'll move the record back to Computers tables & removes tht record from repairs table
is there a way i can do this automatically (without manually move a record)?
Any suggestions - web links or examples will be much appreciated.
Thank you
View 2 Replies
View Related
Apr 28, 2005
I've got a database that pulls from a table. One of the options on the table is pending or complete. Right now, there are over 1000 records because they are all stored in the same record. I'd like to move the completed items to a different table.
Can this be done? If so, what steps do I need to take to do this?
Thanks!
View 3 Replies
View Related
Aug 25, 2005
Hi all,
My database is a simple membership database that adds members and by clicking of a button it tells me the memebers birthdays for the month and if i chose to select the send card option then it remembers who has been send the card.
All i want now is a query that will take a member who's memebrship has been expired (since membership is year long only) and move them to another table by looking at the membership dates (like 2004 and 2003).
And may be later on if those members wants to join the membership i can then add them again from that table back to the main table.
I hope i made my self clear enough.
Thanks alot
View 4 Replies
View Related
Sep 26, 2006
Ok here is what I've got.
I have a table called (EQUIP REG)
It contains all the information to the equipment in the hospitol.
next i have a table called (WO REG)
It contains all the information for the workorders for the equipment.
In the EQUIP REG table I have field titled (PM) this is the date that the equipment is due for PM's. Now I could just run a query for all the equipment on a given date called "MONTHLYPM" and then "open" the workorders by hand....but would be an all day job becuase there are nearly a thousand PM's a month. What i need is a wuery to run off of the above mention query that will copy the some data from the EQUIP REG table to the WO REG table. I only need the fields called "MMCN" "SERIAL" "MODEL" and "LOCATION"
I know very little about access and even less about VBA, so who ever is brave enough to help me must be able to talk on a very low level.
thanks for any help in advance. :)
View 2 Replies
View Related
Jun 27, 2005
Hello. I have a question that seems simple but I can't get it to work. Any help would be appresiated.
I need a form that will pull the oldest record from one table, allow the user to add a few fields to the record, then paste the record to a different table. when it is done the original record has to be removed from the original table.
I have tried using a append Query, but it moves all of the records at once and doesn't allow data entry on each record. I'm not sure if this would be done by a Query, Form or Macro. I have laid out the nessacary data flow below incase there is an easier way to do this.
Persons A,B, and C enters data into table 1.
later person D pulls the oldest record from table 1, reads the data then adds fields to the record and records it to table 2. The information is then removed from table 1. Person D then goes onto the next record from table 1. When person D is done, there will be no data left in table 1.
Any Ideas? or can someone point me in the right direction for help?
View 3 Replies
View Related
Aug 26, 2004
I am working on a calibration database which keeps track of measurement equipment and their scheduled calibration date. There are several gages that become "In-Active" because they are old, lost, or whatever. I have two tables that have Active and In-Active gage listings containing all of the pertinent information regarding that gage. I would like to put a button in the Active gage form which in the event the gage becomes "In-Active", pressing the button moves all of the information in the "Active" page to a new page in the "In-Active" table. So essentially one can look at Active gages and In-Active gages depending on the switchboard button that is clicked.
I know that is probably a crazy question but any thoughts or insight would be greatly appreciated.
View 1 Replies
View Related
Nov 21, 2006
Hello. My question is how do I go about moving data from one field to another within a table? I want to move the data in ReportDateClo to ReportDatCom when both ReportDateClo and SupAct are true by record which are identified by the field LogNum. It is probably very simple but I am having a brain cramp.
ReportDateClo and ReportDatCom are "short date" date fields. SupAct is a Yes/No field. LogNum is an autonumber.
View 2 Replies
View Related
Apr 7, 2015
I'm trying to move a couple tables into the Front End of an Access 2010 database because the drop downs take awhile to load. We have horrible servers at work.
I can get some of them to convert to local table but naturally the ones I really need won't. The only table I want to remain in my backend is "project log data final". I don't even get an error message it just doesn't do it. Why would it not let me convert some to a local table. Does it have anything to do with relationships?
View 5 Replies
View Related
Mar 30, 2015
My boss has assigned a task for me to move the details under a field name (eg:[Name]) in table 1 to table2 under another field name (eg [Insured Name]).
Previously, the software I planned to use is Excel, but my boss says Excel cannot handle large data as the computer will be hanging.So,he wants me to use Access to do the programming.I have some programming backgrounds (like C++) but it seems like I hardly understand how Access works! So can any Access expert here teach me how to do so that i won't get fired.
Firstly, We will have the data like this.
Table1
Code:
Name | PolicyNo | Age | Benefit
--------+----------------+----------+-----------
Chris | 123 | 21 | Death
Jane | 456 | 34 | TPD
Adam | 789 | 55 | DD
Secondly, we let the other staffs to key in which column to be mapped with the other. Manually Key in (both columns).Mapping Table:
Code:
Table1 | Table2
--------------+-------------------
Name | InsuredName
Policy No | Pol_No
Benefit | InsuredBenefit
Age | InsuredAge
Thirdly, the staff will run the VBA and result would be like this.
Table2
Code:
InsureName | Pol_No | InsuredBenefit | InsuredAge
--------------+--------------+----------------------+----------------
Chris | 123 | Death | 21
Jane | 456 | TPD | 34
Adam | 789 | DD | 55
As you can see the new table(table2) , field number 3 is the same with the field number 4 in table1. There is something like copy and paste job, but user can decide how the arrangement for the new table is.
View 14 Replies
View Related
Jul 8, 2014
I have 2 tables, a and b.
Then I have records in each table with fields ,Name and Status(Done and Done_s)
I want records having "Done_s" to be moved to b whenever the change has occurred. Is this possible?(I have tried somethings with Macros but didn't work)...
View 14 Replies
View Related
Apr 26, 2014
I have an Equipment Form with a Supplier subform. The Supplier subform also has a subform, Equipment Pricing Records.
I have the ability to change the Supplier via a combo box, but Equipment Pricing Records become orphaned.
What I would like to do is when a Supplier is about to be changed, for the user to have the option to either a) delete the sub records, or b) the sub records to move across to the new Supplier.
I know I will need to use the after update event once the delete or move decision is made, but I can�t think how to identify the records and then either delete or move them to the new Supplier ID.
The EquipmentID will never change.
Fields are;
EQUIPMENT form;
EquipmentID
SUPPLIER form;
SupplierID
EquipmentIDFK
PRICING RECORD form;
PricingRecordID
SupplierIDFK
EquipmentIDFK
View 14 Replies
View Related
Dec 16, 2013
Move Selected Items Between Listbox1 (listEmp) and listbox2 (listAllocated). the items moved from listEmp must be removed from listEmp when moved to list allocated and vice versa.
Overview:
listEmp is my first listbox and currently has the query in it's rowsource
SELECT e.* FROM qryEmp AS e;
it has 7 columns but only 6 are showing (Column 1 is hidden)
and it is currently bound to 1
listAllocated has only 4 columns (can be changed) i only need the first 4 columns from the first list.
currently it has no row source and the row source type is set to Value
it is also bound to 1
I did find some code that does not do what I need but is closer than anything that I have found so far. It seems like it is copying the Selected Items from Column 1 and pasting it in the second listbox. but it is pasting them all in a row and not in individual columns below is the code. I will post a screen shot in 2 posts time.
Code:
Private Sub cmdCopyItem_Click()
CopySelected Me
End Sub
[Code].....
View 7 Replies
View Related
Mar 20, 2014
move a form without borders but not for microsoft access it's for visual basic microsoft access 2013
View 3 Replies
View Related