Assigning value to text box in a form

Hello there,

I'm trying to assign a value to a text box.
I thought that would have been pretty easy but I keep getting an error 2448
"You can't assign a value to this object" 

This is the simple code that I've been using to do so

Me.txtTotalAmount.Value = "123"

Any idea on what I could modify the codes to make it work?

Thanks,

Bruno.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1

0
brunogrd
8/23/2007 9:38:03 PM
access.formscoding 7493 articles. 0 followers. Follow

6 Replies
4456 Views

Similar Articles

[PageSpeed] 33

How about Me.txtTotalAmount = "123"

Bob

"brunogrd via AccessMonster.com" <u34397@uwe> wrote in message 
news:77248167e4a0c@uwe...
> Hello there,
>
> I'm trying to assign a value to a text box.
> I thought that would have been pretty easy but I keep getting an error 
> 2448
> "You can't assign a value to this object"
>
> This is the simple code that I've been using to do so
>
> Me.txtTotalAmount.Value = "123"
>
> Any idea on what I could modify the codes to make it work?
>
> Thanks,
>
> Bruno.
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1
> 


0
Bob
8/23/2007 9:48:48 PM
Still having an error Nr 80020009
That doesn't seem to work either...

Bruno

Bob Howard wrote:
>How about Me.txtTotalAmount = "123"
>
>Bob
>
>> Hello there,
>>
>[quoted text clipped - 12 lines]
>>
>> Bruno.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1

0
brunogrd
8/23/2007 10:00:44 PM
I'm actually calculating the total amount in a variable and would like to
display the value into the txtTotalAmount text box but can not succeed in
doing so. this is the exact code that I'm using

Me.txtTotalAmount = ShipValue

Thanks,

Bruno,

Beetle wrote:
>The name of your control "txtTotalAmount" implies that it is a calculated 
>control, which might explain why you're having trouble assigning a value to 
>it. You might want to check to see what the control source is for this 
>control.
>
>> Still having an error Nr 80020009
>> That doesn't seem to work either...
>[quoted text clipped - 10 lines]
>> >>
>> >> Bruno.

-- 
Message posted via http://www.accessmonster.com

0
brunogrd
8/23/2007 10:23:06 PM
Is the text box bound to a query or table column?

"brunogrd via AccessMonster.com" <u34397@uwe> wrote in message 
news:7724b3f89d59e@uwe...
> Still having an error Nr 80020009
> That doesn't seem to work either...
>
> Bruno
>
> Bob Howard wrote:
>>How about Me.txtTotalAmount = "123"
>>
>>Bob
>>
>>> Hello there,
>>>
>>[quoted text clipped - 12 lines]
>>>
>>> Bruno.
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1
> 


0
Bob
8/23/2007 11:22:25 PM
Oups ...This is correct....
I've removed the expression into the property text box field which reverted
it to unbound and now it works as intented.

Thanks for the advise.

Bruno;


Bob Howard wrote:
>Is the text box bound to a query or table column?
>
>> Still having an error Nr 80020009
>> That doesn't seem to work either...
>[quoted text clipped - 10 lines]
>>>>
>>>> Bruno.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1

0
brunogrd
8/24/2007 12:50:35 AM
Which means the query (probably not a table) was such that the field could 
not be changed...  Bob

"brunogrd via AccessMonster.com" <u34397@uwe> wrote in message 
news:77262fb18ed14@uwe...
> Oups ...This is correct....
> I've removed the expression into the property text box field which 
> reverted
> it to unbound and now it works as intented.
>
> Thanks for the advise.
>
> Bruno;
>
>
> Bob Howard wrote:
>>Is the text box bound to a query or table column?
>>
>>> Still having an error Nr 80020009
>>> That doesn't seem to work either...
>>[quoted text clipped - 10 lines]
>>>>>
>>>>> Bruno.
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200708/1
> 


0
Bob
8/24/2007 1:24:08 AM
Reply:

Similar Artilces:

assign a shortcut key in access
I want to assign a shortcut key in a form like when a user presses CTRL+S a code should run like Go To Control combo1 and me.combo1.dropdwon any way to do this? You need to yous the AutoKeys macro. Here's a very good explanation of how to do that! http://www22.brinkster.com/accessory/macros/002.shtml -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200707/1 missinglinq via AccessMonster.com wrote: > You need to yous the AutoKeys macro. Here&...

Typing "B" throws the cursor backward and deletes text -- fix?
I know there is a macro or something set up here, but I can't find it. Typing a "B" throws my cursor backward and highlights text. It's driving me nuts! This happens in Office documents, Outlook, and Explorer. Can anybody tell me where to look to fix this major annoyance? ...

Outlook XP: Junk and Alt Mail Box Rules wizard
Hello How can i set a rule that takes first scans incoming mail to see if it is in my junk filter. If it is, then it moves the mail to JUNK. However, I have another rule that moves incoming mail from one of my Mailboxes (ie Mail2) addresses into another folder. These work - except, if the mail comes in this mail address and is Junk -- the mail is saved in both locations (junk and MAIL2). Ideally, if it is junk, it would not get saved to Mail2. junk rule is listed first, mail2 is second. what i am doing incorrectly thanks! stephen ...

Scroll bars on text boxes
Hi, I was wondering if there was a way that we can see the scroll bars on a text box when there's more text than the box can handle without having to click in the text box itself. I need the user to easily identify if there's more text than what he can see without having to select the box. Anyone can help me? Thanks! I don't believe it's possible, due to how Access renders controls on forms. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Gaetan" <Gaetan@discussions.microsoft.com> wrote in message news:82DFA...

How do I show formulas (in values) for the calculation?
when i'm doing caluclations in excel, i want to "show my work". I dont mean just showing the formula (eg. =A10 + B20, you can do this if you copy/paste the function in the cell). But instead, say if the value in A10 is 1 and B20 is 2, i want it to show "=1+2" in the cell. I understand if I type in the cell: '=A10& "+" B20, it'll show what i want. but it'll be veyr troublesome. I need a more automated easier way, almost as easy as say copy and pasting as a special option. I need this so that show my work on the worksheet. Is there possibly a...

Find records that belong to a combo box value
I added a combo box to an Excel wks. I need to find all the records on the same worksheet where column B value=ComboBox value. Then I need to copy the records and paste into another worksheet. Is there a way of doing this in Excel? I appreciate any help. Thank you. If this is not what you are looking for, maybe you can adapt it to do what you want. The code below goes into the Sheet code module for the sheet with the combobox. To access the code module, right click the sheet tab and then click View Code on the pop up menu. Copy the code below and paste it into the code windo...

save new record with one form
I created a form to add several pieces of information to a table. I then added a button at the bottom that I thought was suppose to save each record as a NEW recod. The problem is when I click the button it will save it as a new record, but if I close the application and go to add a new record later it automatically pops-up with the latest entry. I then just edit the information in the form and it doesn't save the record as a new entry.... it saves it as the last entry like I was editing. How do either add code so it will always save as a new record or when I open the form it wi...

Return a charactar from a cell value
Simple question! How do I return a scharactar from a cell value in VB? Like... ANSWER = Left(Activecell.Value, 10) Msgbox ANSWER ....but for example I just want to return one charactar, the ninth, from the cell value. regards Marcus Marcus, MsgBox Left(ActiveCell, 10) or: Dim MyString as String MyString = ActiveCell.Value MsgBox MyString -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Marcus Ostman" <marcus.ostman@smg.net> wrote in message news:c9ee00b1.0408110649.604966f2@posting.google.com... > Simple questi...

CRM form in Offline mode
Hello, in a form, on the onload event, I would like to know if we are in offline mode ? It's possible ? My javascript call a webapplication and I don't want to run this code in offline mode. Thanks PAF Is possible:- if (crmForm.IsOnline==true) { \\ do something } -- Peter Lynch <pierre-adrien.forestier@supinfo.com> wrote in message news:1154422406.607505.169070@i42g2000cwa.googlegroups.com... > Hello, > > in a form, on the onload event, I would like to know if we are in > offline mode ? It's possible ? > > My javascript call a webapplicatio...

See if cell value appears within a value range given by another cell.
In one column (b), have the figure of 470 In another column (a), a cell contains values containing a number, a dash and another number: "425 - 490" I need to check to determine if the number 470 is found within a range defined by a cells contents. In this case, yes, it's equal to or between them. (The dash may or may not have spaces around it. ..could be 425-490, or 425 - 490.) The column (b) item can be the 425, or the 490 and any number in between. Need to do a vlookup to find if the 470 is present in any of the assorted ranges contained in column (a). Thank...

change pixel values in a CBitmap
Hi, I hava CBitmap object that i wish to iterate over and change the values of certain pixel colors, how is this done? thanks in advance lee First, you will have to use GetBitmapBits() and then you'll have to use SetBitmapBits(). Hope this helps. Saul775 "Lee" wrote: > Hi, > > I hava CBitmap object that i wish to iterate over and change the values > of certain pixel colors, how is this done? > > thanks in advance > lee > > Might I also mention that you may want to use GetBitmapDimension(). "Saul775" wrote: > First, you will ...

WEEE value
how everyone handle WEEE in GP? many thanks I don't handle WEEE in GP. I toddle off the the bathroom... Clint "hlv" <hlv@woosh.co.nz> wrote in message news:1158286022.533813.320660@i42g2000cwa.googlegroups.com... > > how everyone handle WEEE in GP? > > many thanks > ...

How do you get rid of that annoying "Instant Search" box in Outlook 2007?
Gurus, How do you get rid of that annoying "Instant Search" box at the top of the middle column in Outlook 2007. It's new. It wasn't there before in Outlook 2003. And I don't like it. -- Spin "Spin" <Spin@invalid.com> wrote in message news:6fm8l0Fc9qqoU1@mid.individual.net... > Gurus, > > > How do you get rid of that annoying "Instant Search" box at the top of the > middle column in Outlook 2007. It's new. It wasn't there before in > Outlook 2003. And I don't like it. > > -- > Spin I don...

Set value of a field based on a value in a subform
Hello - I have a form to add a new record to a record set. I would like to create an AfterUpdate procedure that will set the value of one of the fields in the main form to the value of the related field in the sub form. The forms are linked by the BrdSN field. I have: Private Sub BrdSN_AfterUpdate() ' set the value of the BGA# field in the main form ' to the value in the BGA# field in the sub form Me![BGA#] = Me![MySubForm].Form![BGA#] End Sub but nothing is updating. Thanks for your help! sandy In which form's module is this co...

Assigning values from a sheet to an array
Can anyone explain why I get a runtime error with the code below.MANY THANKS! Option Explicit Option Base 1 Sub testing3() Dim Vt() As Double Dim j As Long Dim i As Long ReDim Preserve Vt(1 To 40) For i = 1 To 40 j = Int(Rnd() * 1100) Vt(i) = Worksheets("data").Cells(1, j) Next i End Sub ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Software! http://www.ozgrid.com/Services/excel-software-categories.htm ** Because j is greater than 256, the maximum number of columns in Excel. Alan Beban Ann...

Create a Form
I need some good info on how to create and use forms in Outlook 2003 I am new and would like any good learning source. Thanks See http://www.outlookcode.com/d/forms.htm=20 FYI, there is a newsgroup specifically for Outlook forms issues "down = the hall" at microsoft.public.outlook.program_forms or, via web = interface, at = http://www.microsoft.com/office/community/en-us/default.mspx?dg=3Dmicroso= ft.public.outlook.program_forms --=20 Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http...

text data consolidation
Hi all, I am working with a data set that has 200 records. I have a colum (text data) has that about 9 different values. What I want to do i lump some of them together. e.g. dry/perenial and non-perennial I wan to place into another column,and label it dry. So I am trying to winno down the 9 different values to 3 different ones; dry, diversion, an other. I could just go down the present column and do it manually, bu there has to be a faster way. Any help would be good. TIA, Rand -- arak ----------------------------------------------------------------------- araki's Profile: http://www.ex...

How to paste and wordwrap a paragraph of text into Excel 2002
I like to save small bits of information, usually messages (answers) from online forums, into a worksheet I call "misc notes". Trouble is when I do this, a paragraph of text ends up as one long sentence stretching across many cells, disappearing off the screen to the right. I'd like to be able to paste text into a given area, actually into the width of the screen, and have it wordwrap into the next row when it reaches the width of the screen. How can I do this? Excel 2002 doesn't even allow the word "wordwrap" in it's help keyword slot. John Just to be...

No "Assign Macro"
In the Excel help files it indicates that you can execute a pre-recorded macro from a command button. It states to first record the macro, then create the button, then right click on the button to get the shortcut menu and choose Assign Macro. I have tried this in both Excel 97 and Excel 2002 and in both cases I do not have any such item as "Assign Macro". Am I missing something If not by this elusive shortcut menu item, how can I assign the pre recorded macro through code? Aaron, It may be that your working with a command button from the "Control Toolbox" instead of...

Serial Numbers auto assigned
S/N are being auto assigned when the SOP Setup Options DO NOT have "auto-assign serial numbers" marked. We do NOT want to use a separate fulfillment process. Up until a few months ago, everything was fine. Now, when a PO item, assigned to a sales line item comes in, the s/n is autoassigned. How can I get this to go back the way it was? Below is the way we have had our SOP set up for eight years - why has it changed? Set-up>SOP>ORDER Allocate by: Doc/Batch X Transfer Order to BO / Transfer Order to Invoice Options: X Allow repeating documents _ Use Separate Fulfil...

#VALUE! error: vlookup works in Excel 2000 but not 2003
Hi, My client has a spreadsheet which works fine in Excel 2000 but when opened with Excel 2003 it populates the pages with #VALUE! and the best I can tell is that the problem is with the following formulas. Can anyone advise if they have seen this before. I am unable to post their file but this is the code that I think is a bit suspect. =IF(ISERROR(VLOOKUP(B14,'C:\Documents and Settings\User\My Documents\[Price List 040301.xls]Items'!$A:$M,11,FALSE))=TRUE,"",VLOOKUP(B14,'C:\Documents and Settings\User\My Documents\[Price List 040301.xls]Items'!$A:$M,11,FALSE...

keyboard messages in Modal dialog box
I know andI have used pretranslate() but I want keyboard messages in Modal dialog box without creating any control on the Modeless dialog box so how i can get the keyboard message. "kotakmayurr@gmail.com" wrote: > I know andI have used pretranslate() but I want keyboard messages in > Modal dialog box without creating any control on the Modeless dialog > box so how i can get the keyboard message. The question is a bit confusing... ? You should use CWnd::PreTranslateMessage BOOL CMyDlg::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == WM_KEYDOWN) { ...

Is there a way to extract Dropdown List values from CRM?
I'm wondering if there is an easy way to extract all dropdown list values from a customized CRM deployment. I want to put them in a document to use as a baseline for a similar implementation. You can export your customizations by going to Settings > Customization > Export Customizations. You can export all your customized entities into an XML file that you can re-import into your other deployment. You'll be able to choose which entities to import. But you will get all the customizations on the selected entities, not just the picklist values. However, you can also use this...

using text in a formula
I'd like that the FileName reflects a text from the first column of the same row. =VLOOKUP($E$1,C:\Path\[FileName.XLS]Sheet1'!e,2,FALSE) I've tried =VLOOKUP($E$1,C:\Path\[CELL("contents", A1).XLS]Sheet1'! e,2,FALSE) but it's not working. Could you advise anything? Thanks Hi if the other workbook is opened use the following formula =VLOOKUP($E$1,INDIRECT("'[" & A1 &".xls]Sheet1'E1:D100"),2,FALSE) Note: This won't work with a closed workbook! -- Regards Frank Kabel Frankfurt, Germany AlexD wrote: > I'd...

fitting text to shapes
Using Pub 2003 and Win XP Some time ago the was a mention of text in Autoshapes. I have inserted text in an autoshape but cannot get it to flow to the shape. For example an oval block of text within an oval shape. All I can get is a square block of text as wide as where ever I start. Am I missing something? -- John G Wot's Your Real Problem? John G wrote: > Using Pub 2003 and Win XP > Some time ago the was a mention of text in Autoshapes. > I have inserted text in an autoshape but cannot get it to flow to the > shape. For example an oval block of text within an oval shape...