How to display record data in a table in MS Access

2019-02-19 08:12发布

问题:

I am working in Offiice Access on a form. I notice that there are not a lot of controls available to use but I have a requirement to display data in a table like structure(not listbox or combobox). How can I accomplish this please?

回答1:

Actually, one of the truly great features in Access is what we call a continues form. A continues form is simply a form in which you can place any kind of control you want, the magic trick part is those controls will repeat over and over for you for each row of detail - the result is a grid, and I dare say one of the most powerfull grid controls avaialble - it is fully programable with VBA.

Not only does such a setup give you one of the best grid controls that our IT industry has ever seen, but it is very little work on your part to create this marvels.

So you can drop pictures, even buttons, check boxes and even combo boxes. They will all repeat as a grid for you.

So here is an easy screen to create in Access:

And here are a few more ideas. Note that some of these are Access web forms, but all of the look + feel is available for client forms or web forms.

So keep in mind that the new full web effects forms that can run in a browser, or even client only forms can use these new effects such as shadow, hover effect etc.

and this one:

and

The above is VERY cool since I dropped in a rich text control and bound it to a function. the result is a column that displays the diffenrce between the two rows in Red. How cool is that?

All of the examples above are what we call a continues form in Access and were built with very little effort and all of the above examples are 100% built only using Access forms, including the graphics for the buttons with shadows.



回答2:

There are a lot of controls. You can add a subform, which will display a continuous form or a datasheet, or even a query or table. You can switch the form itself to datasheet view or continuous form.