Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Problem setting value of a grid field

44 ವೀಕ್ಷಣೆಗಳು
ಮೊದಲು ಓದದ ಸಂದೇಶಕ್ಕೆ ಸ್ಕಿಪ್ ಮಾಡಿ

sup

ಓದದಿರುವುದು,
ಜನವರಿ 9, 2006, 04:40:04 ಅಪರಾಹ್ನ9/1/06
ಗೆ
Hi,
I am trying to set the value of a field in the grid on the form and I get
the following error:
"You cannot set the value of an object that the application explicitly
disabled."
Why would I get this error and what could I do to get around it?

Thanks & Regards,
Sup

Dan Hufford

ಓದದಿರುವುದು,
ಜನವರಿ 9, 2006, 05:25:31 ಅಪರಾಹ್ನ9/1/06
ಗೆ
Sounds like you have been using the SetObjectValue function. The application
has disabled the field so when try to set the object value, you will get
this error. This could be one of many reasons: a)the batch has been
released, b) it is a field automatically assigned/calculated by Solomon,
etc.

You can get around this (but be sure that you aren't breaking any accounting
or validation rules) by using the SetBufferValue function instead (I am
assuming that you are doing this within Customization Manager).

-Dan


"sup" <s...@discussions.microsoft.com> wrote in message
news:F3D8D7EB-92D1-4E24...@microsoft.com...

sup

ಓದದಿರುವುದು,
ಜನವರಿ 9, 2006, 06:12:02 ಅಪರಾಹ್ನ9/1/06
ಗೆ
Hi Dan,
When I use the SetBufferValue method I get an error that SetAddr method
should be used before using Get/SetBufferValue.
So I used the VBA_SetAddr method.
Now I get an error saying ScreenInit must be used after SetAddr calls.
How should I get over this?

Thanks & Regards,
Sup

Dan Hufford

ಓದದಿರುವುದು,
ಜನವರಿ 9, 2006, 09:27:58 ಅಪರಾಹ್ನ9/1/06
ಗೆ
Are you trying to do this in a screen customization using Customization
Manager, or is this a VB Tools application? ScreenInit is called within a VB
Tools app, so I want to make sure I understand exactly what you're trying to
do.

-Dan

"sup" <s...@discussions.microsoft.com> wrote in message

news:2DB23E1A-F978-46BE...@microsoft.com...

sup

ಓದದಿರುವುದು,
ಜನವರಿ 10, 2006, 10:11:03 ಪೂರ್ವಾಹ್ನ10/1/06
ಗೆ
Hi Dan,
I am trying to do this in a screen customization using Customization Manager.

Dan Hufford

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 10:01:51 ಪೂರ್ವಾಹ್ನ11/1/06
ಗೆ
What does the code look like?


"sup" <s...@discussions.microsoft.com> wrote in message

news:35180D7C-952B-4B5F...@microsoft.com...

sup

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 10:15:04 ಪೂರ್ವಾಹ್ನ11/1/06
ಗೆ
Hi Dan,
Below is the code that I am using.
Dim RecFound As Integer
Dim MemMaintFlg As Integer
Dim Nbr_Of_Batches_Processed As Integer
Dim MemHandle As Integer
Dim TaxID$

MemHandle = GetGridHandle("Spread4")
RecFound = MFirst(MemHandle, MemMaintFlg)
While (RecFound = 0)
TaxID = GetObjectValue("ctaxid_4")
If Trim(TaxID) = "SUP" Then
' serr1 = SetObjectValue("ccuryMerchTax_4", Str(55))
Call SetBufferValue("ccuryMerchTax_4",Str(55))
End If
RecFound = MNext(MemHandle, MemMaintFlg)
Wend

I was using SetObjectValue earlier but now I am using SetBufferValue.

Dan Hufford

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 10:24:00 ಪೂರ್ವಾಹ್ನ11/1/06
ಗೆ
Your problem is that you are still using the control name, not the control's
buffer value.

If you look at the fieldname property of that control, "ccuryMerchTax_4",
you will find the buffer.value that you are trying to set.

Example:
Call SetBufferValue("bsotax.curymerchtax", str(55))

-Dan

"sup" <s...@discussions.microsoft.com> wrote in message

news:BEAC4402-9E00-4E33...@microsoft.com...

sup

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 11:18:03 ಪೂರ್ವಾಹ್ನ11/1/06
ಗೆ
Hi Dan,
Now I have another problem. I use Call
SetBufferValue("bsotax.curymerchtax", str(55)) and got rid of the error. But
it looks like it does not set the value.
I mean when I use Msgbox GetObjectValue("ccuryMerchTax_4") immediately after
setting I can see the value but when I actually look at the grid I dont see
the value. I tried looping through the grid again and I dont see the value
that I set.

Is there something that I am missing. Do I need to refresh or do something
else?

I appreciate your help and patience.

Dan Hufford

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 11:41:33 ಪೂರ್ವಾಹ್ನ11/1/06
ಗೆ
Try doing a DispFields after the SetBufferValue call:

Call DispFields("Form1", "")

-Dan

"sup" <s...@discussions.microsoft.com> wrote in message

news:CE3A2297-6A29-4CA9...@microsoft.com...

sup

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 12:22:03 ಅಪರಾಹ್ನ11/1/06
ಗೆ
Hi Dan,
CallDispFields displays the value when I have the formview open. When I move
to gridview it doesnt display the value.

As I mentioned in my previous post when I loop through the grid again
GetObjectValue doesnt return the value that I had set.

Seems like as if it doesnt save the value I set in the memory array. Why
should this happen?

sup

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 12:32:06 ಅಪರಾಹ್ನ11/1/06
ಗೆ
I need something like MSet to set the value of control in the grid. But I
dont want to set all the values to 55 but just one row.

Is there a way to do that?

sup

ಓದದಿರುವುದು,
ಜನವರಿ 11, 2006, 12:37:02 ಅಪರಾಹ್ನ11/1/06
ಗೆ
Hi Dan,
Thanks for all the help. i actually figured out. I used MUpdate to update
the record in the memory array.

Thanks & Regards,
Sup

thilla...@gmail.com

ಓದದಿರುವುದು,
ನವೆಂ 7, 2014, 06:22:25 ಪೂರ್ವಾಹ್ನ7/11/14
ಗೆ
Thanks Dan hufford .i have a same problem ...
0 ಹೊಸ ಸಂದೇಶಗಳು