SetValue But Only On Certain Forms

Mar 30, 2012

I am having issues with the SetValue macro. Basically, my database is for HR and uses a series of forms to enter a new hire, and to export this new hire to excel for a data upload. The weird thing is that it worked before, then all of a sudden, it gave me error 2950 while trying to run a macro which had a few SetValue functions.

I went to another form to see if that one worked w/ SetValue (because the database is trusted in my system), and it did. So my problem is that I'm receiving error 2950 (trust issues) in one form, but not receiving the same error, from the same function, on another form.

View Replies


ADVERTISEMENT

Forms :: Can Use IIF Statement Within SetValue Expression?

Dec 9, 2013

I'm using A2003 (yes, still). An accounting type form requires the "Type" be entered as either (numeric) 1, 11, or 2. On the same form, one of the three Yes/No fields must be checked as confirmation.

My hope is that I can use the "SetValue" action in a macro.

My first attempt (to set the "Assiniboine" field to "Yes" or "On"):

Item: [Forms]![DisbursementMade]![Assiniboine]

Expression: IIf([Forms]![DisbursementMade]![Type].[AfterUpdate]=1,Yes)

That isn't doing anything for me.

The default value for the "Type" field would normally be 1 (but that presumes the user will not skip past it without confirming it) so I have no default value.

The other two Yes/No fields would also be Set by the same logic: (if Type=11, [Bank]=Yes) (if Type=2, [PettyCash]=Yes)

Alternatively, I've tried the reverse approach: If [Assiniboine]=Yes, SetValue of [Type] to 1 so far without success. I'm not using VBA, since the bookkeeper changes from year to year and there is no Administrator. Although the computer has A2010, and can run an .mdb file with macros, successfully, making changes within A2010 produces an 'embedded macro' that isn't readable in A2003.

View 2 Replies View Related

Forms :: SETVALUE Argument Cannot Run In Disabled Mode

Oct 10, 2014

I don't know, I have noticed that the SETVALUE argument is not openly available in the lookup tables when setting a macro. (But that aside) I have set my drives c: and d: as trusted, and also thicked the sub folder option.

View 7 Replies View Related

Forms :: Increase Maximum Characters Allowed In Expression Of Macro Setvalue Action

Apr 23, 2013

Is there a way to increase the maximum characters allowed in an expression of a macro setvalue action ?

I have an expression in a macro setvalue action that adds multiple form textbox values. I need to change the form name from "RATING ENGINE 2" to "E RATING ENGINE 2". When I do this, I exceed the maximum characters allowed in the expression. Is there a way I can rename "RATING ENGINE 2" without this problem. The expression is as follows:

[Forms]![RATING ENGINE 2]![Excess Liab Premium 6]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 7]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 8]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 9]+[Forms]![RATING ENGINE 2]![Excess Liab Premium 10]

View 6 Replies View Related

SetValue

Feb 19, 2008

I've linked my inventory database to a table that holds data for my web site. Using a macro I can transfer the data in several field at the click of a button. I've run into a problem with one field called [SizeW] in my inventory and [width] in the web site db. [sizeW]is in meters and [width] needs to be in centimeters so I made my macro expression [sizeW]*100. The trouble is I get an incorrect result. 0.87 becomes 87.0000004768372 and so on. I have tried setting the format in the web site db to General Number and 0 decimals but this doesn't work. I can't think of anything that could be the cause.

Any possibility this could be caused by a naming issue? I think 'width' might be a reserved terem for access.

View 4 Replies View Related

Setvalue Equivilant

Jun 22, 2005

I'm trying to create a database that we can use to track Vacation, Sick, and Personal days. It's a very simple setup, for each option I have a start value a place to enter the amount used and and expression field that calculates the time remaining.
My query calculates the difference (Expr1: timelosstbl!SickBeg-Timelosstbl!SickAccUsed)
but this value isn't stored, since it runs everytime the query is run. So I have another field that (SickTotal). I have a button that on click it runs a macro and I use the SetValue action and it takes the value in the expr1: field and copies it to the SickTotal field. I have another button that on click runs basically the same macro that copies the value in the SickTotal field to the SickBeg field. My problem is that when I click the button everyting works but I doesn't remove the figure that was manually entered in the SickAccUsed field. So what I thought I needed to do was instead of using a macro to run the procedure I'd do it as an event procedure but I don't know how to recreate the macro because when I do either me. or docmd. setvalue isn't an option.
So basically what I need is
A=starting figure, B=manually enter hours used, C=remaining time, D=stored value for C

A - B = C, C = D on click make A = D and clear B

Confused?

Thanks,
Rick

View 4 Replies View Related

SetValue Of Combobox ??

Jun 17, 2005

I have two Combo boxes which work as selection boxes for the detail form. So, if one Combo box selects Name - the detail form is filled with the information belonging to that Name...

However, I have two combo search boxes: one for Name and one for Clientnumber. They both work fine, but I would like to reset the first combo box if the other one is used and vice versa.

So, basically, my question is: how do I reset a combo box in a AfterUpdate (right?) event of another combo box?

View 3 Replies View Related

Multiple Setvalue

Jan 2, 2007

Currently using an IsNull expression to Setvalue of a field to Invisible but rathe than type the condition,action,item,expression form every field i want to make invisible, can I list fields and attach to one ISNull condition, if that makes sense?

Currently have:[Stk Entitlement ID2].[Visible], but would like to add other fields like:[Stk Entitlement ID2],[Stock ratio 2],[Stock Entitlement 2].[Visible].

View 3 Replies View Related

SetValue Action Help!

Aug 16, 2004

I have set up a form to use for entering and specifying report criteria. I followed the instructions from general Access help. Everything worked fine in MS Access 2000. Now, I've transferred the database to a computer using MS Access 2003 and I get and error that says, "You entered an expression that has an invalid reference to the property Visible. The property may not exist or not apply to the object you specified." If I change the Macro for the "OK" button from Action="SetValue", Item="[Visible]", and Expression="No" to Action="SetValue", Item="[Forms]![frmParameterQuery].[Visible]", and Expression="False", which I though may be the correct way to enter this for the newer 2003 version of Access, then I get a different error message that reads, "You don't have the license required to use this ActiveX control. You tried to open a form containing an OLE Object or an ActiveX control or you tried to create an ActiveX control. To obtain the appropriate license, contact the company that provides the licensed OLE Object or ActiveX control" Please help!

View 3 Replies View Related

SetValue Macro

Sep 15, 2004

Ok. I have a database which tracks the sales and wherabouts of my artwork. Mostly I sell works on a sale or return basis, so I have a form which finds the delivery and opens the delivery details in a subform. This way I can tick off individual items in the delivery as they sell.

I also sell things outright. However, when I am paid for these sales, I want to be able to tick a 'sold' check box in the main form which then automatically fills in the date sold field (on both form an table) as the current date for all the items in that delivery, i.e. I want to tick the box once in the form causing the date to be entered into each record in the subform automatically.

I have tried making a command button on the form with a SetValue macro. I cannot get this to work with a date (maybe I have got the expression wrong) and also it only works with the first record on the subform.

Can anyone solve my problem or do I just have to be patient and enter each date individually?

View 2 Replies View Related

SetValue From SubForm To Another Form

May 27, 2005

I have a main form FrmQuote that has 2 Subforms. The 2nd subform FrmCalculateQuote is based on a calculation query. In order to save a calculated value I have another Table/Form (FrmSCQuoteOverviewUpdate) that records the quote value calculated in the subform FrmCalculateQuote (text34)

The following forms are open FrmQuote FrmSCQuoteOverviewUpdate and subform FrmCalculatequote.

In the subform FrmCalculatequote I have created a button click event that should set the value of [tot contract cost] in FrmSCQuoteOverviewUpdate
to text34 in the subform

Forms!FrmSCquoteoverviewUpdate![tot contract cost] = forms!Frmcalculatequote![text34]

when runnng the code I get the error message "run time error 2450..can't find the form FrmCalculatequote.."

It seems that the problem is in calling the subform just forms!....

Can somebody please help me with the code to refer to a subform.. :confused:

View 3 Replies View Related

SetValue To Set Query Criteria

Dec 22, 2011

Is it possible to use the SetValue macro action to set field criteria in a query? I've done this in the past by creating a form, using SetValue to set a value for a form field, then having the field in the query read from the form field.I noticed in the expression builder under the SetValue action that it allows you to select query fields directly though.

View 1 Replies View Related

Using SetValue Macro In Runtime Environment

Nov 15, 2006

Hello all,

I am currently using the SetValue function from within a macro to set the value of one text box to the value of another. It works fine under full version but when I use it under Runtime which is where the final application will be run from, it brings up the Halt box and will not continue the macro.
Does anyone know what can/cannot be done within Runtime. Is it just the same as A full version but without Design functions or are some other functions removed. I am painstakingly having to go through all the vba code that I wrote in full version and I am having to change so many things in order for it to work with Runtime. This is a real pain the backside!
Any thoughts would be huuuugely appreciated.

Thanks all!

Gareth

View 1 Replies View Related

Using DLast Or DMax Functions Within SetValue Action In Macro

Oct 28, 2012

I am building a purchase requisition (PR) database.

The tables are (simplified) as follows:

Table1 - tbl_PRList - contains only 3 fields with one of these fields being the "PR No".
Table2 - tbl_PRData - contains all the item data, also with a field "PR No".

The intent of the "item entry" form is to add items to the latest PR that has been generated.

So, whenever an item that is to be placed on the new PR, you type in the item description, qty, etc in the form and then you press a button that saves this item to the main 'data' table (Table1). What I would like to do is, "on click" of this button, I'd like this record, prior to it moving to the next record, to set the value of the PR No field in Table 1 to be the same as the DLast value of the Table2 table.

View 2 Replies View Related

Using SetValue To Change Field Property Based On Another Field Value

Dec 15, 2006

I would like to change the property of a text box to Visible and Required when a user chooses a specific value in a drop down box of a different text box. Is this possible using a macro or some other way?

Thank you,
Deana

View 1 Replies View Related

Forms :: Find Hex Or RGB Value For Blue Color That Access 2010 Uses By Default For Buttons On Forms?

Sep 5, 2014

Where can I find the Hex or RGB value for the blue colour that Access 2010 uses by default for buttons on forms? I need to change some buttons to yellow (I know the code for that) but later change them back to the previous shade of blue, which is shown in the Properties pane "Accent 1, Lighter 40%".

By clicking in the standard colors area at the bottom of the colour chooser I can find a very similar blue #D6DFEC but it doesn't look quite right. And the "accent" colour does not give me a Hex value.Is that "usual" blue even one colour? How can I reset a button to that style having changed it?

View 14 Replies View Related

Forms :: Number Of Buttons Which Open Other Forms And Filter Results Using Embedded Macro

Apr 6, 2015

I have a bit of a problem with a database in Access 2013. On 1 of the forms, I have a number of buttons which open other forms and filter the results using an embedded macro. All has been well until a few days ago when error 2950 pop up box started appearing. After fiddling around for a while it all works OK (without actually changing anything) until next time the database is opened. I checked to make sure the location is "trusted" and all seems OK.

View 4 Replies View Related

Forms :: Continuous Forms - Looping Through Records / Manipulating Fields On Form

May 29, 2015

I have a bound continuous tabular form,However, based on data content in one field of a record, I want a checkbox in the same record enabled, so the user can check it if necessary. I have created a record set using the form as shown below, and I am looping through each record. To show that my code is referring to the field with required data content, I display it as a message box and it works, yet my checkbox does not enable.

I have the code in the form_load event, however, for testing purposes I have it behind a button.If I am seeing this properly, the code behind the button enables the checkbox for ALL records once the criteria in the required field is true, and based on the last record, which has no data content, it disables the checkbox in ALL records. I also have the PK ID for each record hidden in the form. Can I utilize that to target the checkbox of each individual record??

Form Detail
-Form does not allow additions or deletions. Edits allowed
-All fields are disabled and locked
-I only want the check box to unlock if data is found in the "RequiredField" as referred to below. I have also tried if not isNull(requiredfield.value) then -enable checkbox, which yields the same results

Here is my code

Code:

Dim rstMyForm As DAO.Recordset
Set rstMyForm = Forms!MyForm.Form.Recordset
rstMyForm.MoveFirst
Do While Not rstMyForm.EOF
If Not RequiredField.Value = "" Then

[code]...

View 14 Replies View Related

Forms :: Editing A Forms Control Source To Update A Field In A Table

May 28, 2013

I have created a table for installer invoicing, and have a field for invoice amount. I have created a user input form that allows a user to fill in certain pay rates for different aspects of installation, and would like to know how to make the invoice amount a calculated control that will auto update the field InvoiceAmt in my table. I can't figure out how to do this in the property sheet.

View 3 Replies View Related

Forms :: Default Property / Using A Control Of Main Form Without Using Names Of Forms?

Nov 8, 2013

In the default property of a subform control I want to use a control of the main form without using names of forms, but using me and parent.

I used in default property of cboVATDetail: =Me.Parent!cboVAT, but it is not accepted. My aim is to use cboVAT of parent as default in cboVATDetail of child.

View 3 Replies View Related

Forms :: Subform Control Event - Identify Parent And Child Forms

Jun 20, 2013

I have a listbox on a subform (or a subform within a subform).

When it is clicked I want all other listboxes to unselect.

There may be listboxes on the mainform, on other subforms, on other subforms of subforms.

I imagine I'm looking at a recursive function of some sort, but I'm not entirely sure of syntax to identify parent and children forms...

pseudocode so far:
loop all controls
if control = listbox, unselect all
if control = subform - recurse: loop all subform controls
if control = parent... err... Fail.

View 3 Replies View Related

Forms :: Button Click Event To Choose Between Forms To Open Based On TextBox Input

Jun 7, 2013

Making a small database, Got 1 Table.

1. ContactDetailTable

Got 3 forms.

1. ContactIDForm
2. ContactInfoForm
3. NewContactFrom

In ContactIDForm it contain 1 textbox name 'TextBox' with Button Name 'Btn'

In ContactIDForm there is only 1 Text Box ContactIDTextBox and 1 Button. User Enters ID in TextBox and On Button Click Event it should check data from TextBox in Table name (ContactDetailTable) in field ContactID and if there is record matching, ContactInfoForm should Open else NewContactForm should open with ContactIDTextBox value in it.

View 10 Replies View Related

Forms :: Permit Only 50 Group Leaders To Input / Edit Data On Password Protected Forms

Jul 29, 2015

I am building a very comprehensive Membership Management Database with extremely useful facilities initiated by some 20 or 25 Queries..

The database includes 5 Tables which store data relevant to members, another which stores details of Interest Groups and a 3rd which stores which members are affiliated to which Group or Groups.

Currently the database is accessible only by a very limited number of persons and data can be entered/edited by only one person. The database, using Access 2010, is maintained on a desktop computer and synchronized to a copy on a Cloud.

My requirement is to permit some 50 Group Leaders to input/edit data on a Password protected Group Members Form such that that is the only element of the database that they can access. The Forms would have only 2 fields from which the user would select entries from drop down lists.

My query is ; is such a procedure feasible in principle and would I be correct in assuming that the user would require to have available a copy of Access.

View 7 Replies View Related

Forms :: Pull Calculated Values From Approximately 10 Forms Into Another Form

Mar 21, 2013

I need to pull the calculated values from approximately 10 forms into another form. This is a summary form that should have all the totals pulled from the other forms.e.g. Form A has a textbox that reflects the sum of the amount. This is the total balance of form A.Form B, Form C, etc. all have a total Balance.Now, i need to pull all these totals into a summary form

-Form A Total Balance: x
-Form B Total balance: y, and so forth.

How and what is the best method to approach?I have tried using Forms![Formname]![Total] to get the data. This necessitates the need to hide all these forms and I ended up with blank forms, etc.Even so, the total sometimes appear and sometimes it does not. so it is very unstable.

View 11 Replies View Related

Forms :: Form Working Properly Alone / But Gives Error When Combined With Other Forms

Jun 5, 2015

I have a form "NewMetalF" that has three combo boxes. The first one is used to choose "Precious Metal" or "Base Metal". The second one shows all the metals based on the first combo box. When I open the form in form view alone the combo boxes work flawlessly. I run the form "NewMetalF" within another form "NewExternalPartF" by clicking a button "AddMetal". When the button is clicked "NewMetalF" opens. The first combo box is selected, and when the second combo box is clicked the error "Enter Paramater Value" "Forms!NewMetalF!cboPreciousOrBase".

View 13 Replies View Related

Forms :: Mixing Forms Overlapping Windows And Tabbed Documents

May 22, 2015

Is there any way to mix together on a db based on tabbed documents some overlapped forms?

View 4 Replies View Related







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