Re: GUI for access 2002



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?

...
'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.

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

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



.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.



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]
.



Relevant Pages

  • Re: GUI for access 2002
    ... just referencing the first record in it. ... the form named "change members" is not opened, ... I spent some time tiring ...
    (microsoft.public.access.gettingstarted)
  • Re: SYNC Form to listbox
    ... Modified code: ... I am thinking of an alternative approach, that being a cloned recordset ... based on the option box criteria and then displaying the first record. ...
    (comp.databases.ms-access)
  • Re: Missing first row in recordset from excel using .getrows
    ... I'm using the following code to get a recordset of an excel file. ... the getrows call to fill the variant array p. ... I notice that in the first record, ... Dim RDB As ADODB.Record ...
    (microsoft.public.vb.database.ado)
  • Re: Recordset problem..
    ... > Hi..I have problem in reading the first record after looping the ... i cannot read any record in recordset ... > after the first round reading. ... to do a .MoveFirst to get back to the first record. ...
    (microsoft.public.vb.general.discussion)
  • Re: really baffled - a might OT about recordset EOF
    ... I've never seen a populated recordset return a true EOF ... > the first record if the recordset contains any recorcords at all, ... > quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)