Switching Continuous to Single-Record view

  • Thread starter Thread starter Dave Alger
  • Start date Start date
D

Dave Alger

I posted this in access.forms last week, but perhaps this newsgroup is a
better place for it:

Hi all,

I have a subform displaying records in Continuous view. I'd like to be able
to change it, programatically, to show a single-record view (and vice
versa).

Is this possible? I thought the CurrentView might be an answer, but that's
read-only at runtime.

Thanks in advance for any help you can offer.

regards,
Dave
 
Not an expert but; have you tried making two forms and switching between
them via a command button?
i.e. under the first form's OpenOtherViewButton code:
....
DoCmd.Close
DoCmd.OpenForm acNormal, "form2name"

Just a simple approach.

Alp
 
Alp,

I've tried a variant of that. I had two subforms and I toggled their
visibility. The problem being, as I understand it, that there's two copies
of the recordset open at once.
Your suggestion might be worth a go if this proves impossible :)

Thanks,
Dave
 
I going to suggest that you use two forms, since you can't really setup, or
size the "edit form" to be the same size as what the continues form needs to
be.

So, take a look at the following screen shots, and you will see that I
simply place a button on the continues form to launch a new form with the
one record.
http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

and:

http://www.members.shaw.ca/AlbertKallal/Search/index.html

The code to do this behind the button to launch the form is easy,:

docmd.OpenForm "frmEditCustomer",,,"id = " & me!id

If you allow editing in the continues form, then you need to write the
record to disk before you let another form try and edit he same record. To
the above, just add:

if me.dirtry = true then
me.dirtry = false
end if
docmd.OpenForm "frmEditCustomer",,,"id = " & me!id
 
Back
Top