Populating unbound forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi how do i populate a unbound form. What is the best way to get the data
from the tables to the fields. I can not find much documentation on this so
if anyone could point me in the right direction that would be great

Thanks

Dean
 
Hard to say without any details.

DLookup would be one option worth reviewing. If you explain yourself a bit
more, we would be better placed to guide you appropriately.
 
Dean said:
Hi how do i populate a unbound form. What is the best way to get the data
from the tables to the fields. I can not find much documentation on this
so
if anyone could point me in the right direction that would be great

It is worth the minimal time and effort to learn how Access works with bound
forms for forms with data. Really. It is.

If not, you are duplicating the time and effort that was expended to build
form population and updating into the product, and you are subjecting
yourself to possible errors for which you have to test anew on each unique
form.

That said, if you feel _compelled_ to use unbound forms for data, and the
data is not to be updated, you can populate the Controls, as was suggested,
with domain aggregate functions, e.g. DLookup, Dsum, DMax, Davg. If the data
is to be updated, you'll have to write VBA code to get the data, display it,
determine if it has been changed, and then write the data back to the tables
in your database.

I often use unbound forms as "switchboards" for navigation, or to allow a
user to enter criteria for choosing a report, or choosing what data to
display on a bound form. But they complicate matters if you decide to use
them for data entry or data update.

Larry Linson
Microsoft Access MVP
 
I do know the basics of bound forms.

I am just trying to experiment a to see what the advantages and
disadvantage's are.

There is not many article on unbound forms maybe thats because unbound forms
provide no added value i don't know.
 
Dean, if you want to fool with what Peter Walker calls "novel ideas", you
can create an ADO recordset on the fly, and bind it to the Recordset of your
(sub)form:
http://www.papwalker.com/ref101/adors.html

But as Larry says, it's not of much practical use for a typical subform.
Since subforms are designed to show relational data, every time you move
record in the main form, the subform repopulates with the matching records
(defined via LinkMasterFields/LinkChildFields), so a Recordset is not
helpful.

IME, these kinds of novelties are also good for making your database crash
more often.
 
Back
Top