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 Replies


ADVERTISEMENT

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

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

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

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

[B]Action Cannot Be Found()[/B]

Aug 3, 2007

hello ,
I want to use a wait or timer action like in my attachment file.
could someone see this and show me what I got to do?


thanks aloT!!

View 14 Replies View Related

Countdown Action

Feb 7, 2005

i wonna count down for 20 minits and then autoclose my program. every time there is an activity the counter has to reset. any idea where and how to do it?

thx in advance

killroy

View 3 Replies View Related

Followhyperlink Action

Apr 26, 2008

Migrated from access 2002 to 2007. the followhyperlink action is not picking up the complete data from a text box in a form. it leaves out the last digit/alphabet resulting in incorrect address.worked fine in 2002. any ideas?

View 1 Replies View Related

General :: Log Every Action

Jan 19, 2013

i would like to log every action any member does on my database.i will have a log in screen(passworded) and i would like to record every button clicked. the only thing is i would like to include other things in the record aswell. like record changes. is there a neat little trick to do this or is it just going to be very labour intensive.

View 11 Replies View Related

Undo One Action Only

Aug 17, 2011

I have a form that has multiple text boxes. Was trying to add an Undo button that behaves exactly the same as the (Ctrl+Z) or the undo button used in microsoft access, word, excel ..etc. as it only undos one action in a click. When added the undo button i used just a normal button and added a code to it. if i type in different text boxes and press on the undo button it undos everything modified since the form was opened. Is there a way to change that ?

View 5 Replies View Related

The OpenForm Action Was Cancelled

Aug 23, 2005

I am trying to open a form with a specified record using double clicked event (list box) but access is throwin "The OpenForm action was cancelled". My code is:

Private Sub lstSchool_DblClick(Cancel As Integer)
Dim test As String
Dim thisForm As String

thisForm = "frmRegister"
test = "ID = " & "'" & lstSchool & "'"

DoCmd.OpenForm thisForm, , , test

End Sub

ID is a AutoNumber field. I have used this code in my other dbz and it works fine ....

View 12 Replies View Related

Get Name Of Control That Initiates An Action

Jun 20, 2006

What I need to do is get the name of a control when the mouse is over it. The problem is that I would need to make a custom macro/code for each control since there doesnt seem to be a way to retrieve the name of the control which initiated the mousemove action. Any ideas?

View 6 Replies View Related

Form Not Saving From VB Action

Sep 5, 2006

Hi,

On my Form I have a Label (Recnote) which gets changed by the VB code if criterior is true. My form does change this correctly however, once I quit (or close the Form) and come back, the changes dissappear.

But the strange thing is that every now and then it does save it.

Any ideas??? Any other command I should use?

The following works as it disables my Import button and changes the Label contents but does not save when exited


Private Sub CloseME_Click()
DoCmd.Requery

If [CountOfOracle Co] = 0 Then
MsgBox "Cannot Close ME Yet", vbOKOnly, "Circular Rec"
Else


Me.Recnote.BackColor = 65535
Me.Recnote.Caption = "Final Reconciliation"
Me.Recnote.ForeColor = 32768
Me.Import.Enabled = False
DoCmd.RepaintObject
DoCmd.Save
End If

End Sub

View 14 Replies View Related

Action Query Question??

Sep 21, 2004

Can this be done??

I want to open a report, run an action query to create a table I want to use for the current report?? If It can how would I do it??

Thanks
mack

View 1 Replies View Related

The Command Or Action ApplyFilterSort Isn't Available Now.

Jun 17, 2005

I have created a search window that looks up certain invoicereport by invoice No. I have used this search method in other forms and has worked successfully!

However,
after I created the same thing for a report, I get this message: The Command or Action 'ApplyFilterSort' isn't available now.

I really don't understand the problem.
txtSearch = a textbox where user can type in any value to lookup a certain report.
rptInvoice = where I want the search to be placed.
fraSearch = an option group with (Starts with...,Contains...,Ends with..., Equals...)
InvoiceNo = the txtField in rptInvoice.

this is what I wrote for the cmdSearch button:

Private Sub cmdSearch_Click()
On Error GoTo Err_cmdSearch_Click
Dim strFilter As String
Dim strInvoiceno As String

' Check that the report is open
If SysCmd(acSysCmdGetObjectState, acReport, "rptInvoice") <> acObjStateOpen Then
MsgBox "You must open the report first."
Exit Sub
End If
' Build InvoiceNo criteria string
If IsNull(Me.txtSearch.Value) Then
strInvoiceno = "Like '*'"
Else
Select Case Me.fraSearch.Value
Case 1
strInvoiceno = "Like '" & Me.txtSearch.Value & "*'"
Case 2
strInvoiceno = "Like '*" & Me.txtSearch.Value & "*'"
Case 3
strInvoiceno = "Like '*" & Me.txtSearch.Value & "'"
Case 4
strInvoiceno = "= '" & Me.txtSearch.Value & "'"
End Select
End If

' Build filter string
strFilter = "[invoiceNo] " & strInvoiceno

' Apply filter to report
With Reports![rptInvoice]
.Filter = strFilter
.FilterOn = True
End With


DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70

Exit_cmdSearch_Click:
Exit Sub

Err_cmdSearch_Click:
MsgBox Err.Description
Resume Exit_cmdSearch_Click

End Sub
----
Could anyone help me with this?

View 1 Replies View Related

Forms :: Command Or Action Not Available Now

Jul 11, 2014

I have a form for users to be able to delete or edit records. I have 2 command buttons (Delete and Save), when I click on them I get this error "the command or action is not available now"... It was working fine before but for some reasons it stopped. Even two other buttons actioned by vba codes do not work (No message popping up for these 2)

I checked:
Allow Additions: Yes
Allow Deletions: Yes
Allow Edits: Yes

Nothing is blocked or locked.

I think it has to do with the query my form is based on, as I tried a dummy form based on a table and the button worked fine...? I tried re-creating query+form and no luck. I did remove a field from my query at some point this morning, not sure if this might be the cause of issue, as this field was not connected to anything in my form.

View 2 Replies View Related







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