Gustav Brock
Gustav at cactus.dk
Thu Aug 3 04:28:27 CDT 2006
Hi Doug Then try doing this at the OnCurrent event. Set a flag when done to do this once only. If you try to set the value of a bound control while the form is opening you are trying to update the form which is not possible at that moment. Updating an unbound control does not involve an update of the form. /gustav >>> dw-murphy at cox.net 02-08-2006 19:15:20 >>> Thanks Gustav, After the form is loaded I can run the code to set the textbox to a value and it works fine. As I said in a previous post on this I put a button on the form and ran the line of code and all worked well. Since the line runs in the onload event the form should be populated with all the bound values and my code should update, I thought. Tried to set me.txtFee = 0 and got the same error. Tried without the subform and got the same error. Will keep banging away at it. I didn't realize you could use two fields in a domain aggregate function. That is great, I learned something else. Doug -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Tuesday, August 01, 2006 11:46 PM To: accessd at databaseadvisors.com Subject: Re: [AccessD] Error 2448 "You can not assign a value tothis object." Hi Doug If this works: Me!txtFee.Value = 0 it could have something to do with your query, or you may have an update event of the textbox. Or try without your subform. Also, you don't need to call the query twice: Me!txtFee.Value = DSum("Nz(ShowAmount, 0) + Nz(TotalTax, 0)", "qryVendorWeddingFee") /gustav >>> dw-murphy at cox.net 02-08-2006 05:05:57 >>> Folks, I am frustrated because a form has started throwing an error and I can not seem to isolate it. This was working last week, I think, and now I get the error. It is probably something very simple I am not seeing. IN the onLoad event of the form I have a statement Me.txtFee.Value = Nz(DSum("ShowAmount", "qryVendorWeddingFee"), 0) + Nz(DSum("TotalTax", "qryVendorWeddingFee"), 0) When the form opens I get the subject error message. For debugging purposes I commmented the line out and put a button on the form that does the same thing. This works fine setting me.txtFee to the proper value. At first I was using me.txtFee =, and got the same error. Do any of you see what is going on here? Thanks in advance. Doug