Re: GUI for access 2002

Tech-Archive recommends: Fix windows errors by optimizing your registry




"John Vinson" <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4obok2tartqgbfbj0mrp43nsuk36ljjbt6@xxxxxxxxxx
On Fri, 3 Nov 2006 18:50:51 -0800, "n6trf" <n6trf@xxxxxxxx> wrote:

It seemed so clear to me :-). Sorry here are some pertinent parts of the
code:

with rstmembers

ok... you're not *looping* through the recordset, at least not here,
just referencing the first record in it. Is it a one-record recordset,
or are you intentionally doing this?

In this area the opoerator gets to specify the member with his number
address ...


...
'DoCmd.Openform "change members", acPreview, , , acFormPropertySettings,
acWindowNormal

' DoCmd.Openform "change members"

' Forms![change members].Visible = False

The above lines are all commented so they do nothing (in particular
the form named "change members" is not opened, at least not here...
but...

Forms![change members]![MEM#] = ![MEM#]

you're setting the value of a Control on that form to the value of a
field in the recordset, which will simply overwrite the value of MEM#
in the current record.

Thats the point of the form. The members number address ... is displayed.
Operator makes changes to the boxes with number address ...
and then when the ok button is pushed those numbers address ... are changed
in the record set.


DoCmd.Openform "Change members", , , windowmode:=acDialog ' wait for
the ok

and now you open the form... without any criteria or wherecondition or
filter...

But i have the correct record in the dataset poised for change & update




.Edit

![MEM#] = Forms![change members]![MEM#] & ""

.Update

GoTo Agn


...
end with

If I execute as shown above the loading of the form 'change members'
fails:
Forms![change members]![MEM#] = ![MEM#]

Because the form is not open.

Exactly. Because you haven't opened the form. You have a statement
that WOULD open the form but it's commented out; then on the *next*
line you open the form.

Exactly my problem the commented instructions were attemps to get the file
open so we could load the text boxes with the current member info. However,
never was able.




Notice the 'goto agn' which starts the code again after some preliminaries
establishing the member.

Now that's the 2nd time thru. The form is open & the loading of the form
succeeds.



Notice the first 3 lines are commented out. I spent some time tiring
different methods of opening the form but no banana. HELP

I'm just as perplexed as you are. It's not at all clear what you're
trying to accomplish, and I'm too tired (it's after midnight here) to
go back over the thread and try to figure it out; I'll try again
tomorrow.

John W. Vinson[MVP]


.


Quantcast