Minggu, 28 Agustus 2011

Re: [MS_AccessPros] Having a prob with changing a value in a bound popup

 

Hi Terence,

> The above fails with an error indicating "You can't assign
> a value to this object" I am sure it's because the other
> form "Patient_Visit" is Open.

don't use the Close event ... the data is already gone. Instead, use the Unload event ... and this event can be cancelled ;)

> "Both forms use the same table as it's source"

if you are going to do that, which is not a good idea (in my opinion), make sure you have no memo fields in the RecordSource of either form. Also, make one form a snapshot recordset so it cannot be edited.

> I can get around the problem by placing the field
> POP_TEST_A_Result on the form Patient_Visit ...

this is a better place. Make the popup form unbound so you do not have the same table open in 2 places...

Warm Regards,
Crystal

*
(: have an awesome day :)
*

--- On Sun, 8/28/11, Terence wrote:

> I have a bound form, called
> Patient_visit, not all the fields of the it's table are on
> the form (that is by design). That form has a click button
> which opens a POPUP form, named POP_TEST_A.
>
> Both forms use the same table as it's source, and the popup
> uses the following filter so that appropriate Table row is
> navigated to on form load.
>
> Popups Filter is ID=forms!Patient_visit.id
>
> The popup only has 1 field that is stored, and it's stored
> via the POPUP's Close event as follows.
>
> Me.POP_TEST_A_Result = "0"
>
> The above fails with an error indicating "You can't assign
> a value to this object" I am sure it's because the other
> form "Patient_Visit" is Open.
>
> I can get around the problem by placing the field
> POP_TEST_A_Result on the form Patient_Visit, and in the
> popup's close do a
>
> Forms!Patient_Visit.POP_TEST_A_Result = "XXX"
>
> But I would think there is a way to accomplish this without
> having to place POP_TEST_A_Result on the Patient_Visit form.
> Is there ?
> TY in advance, Terence
>
>

__._,_.___
Recent Activity:
MARKETPLACE
A bad score is 598. A bad idea is not checking yours, at freecreditscore.com.
.

__,_._,___

Tidak ada komentar:

Posting Komentar