Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

Form to display editable records across the page

I have a flat table with the following structure where I need to record events applicable to days - only one event record per day:
   EventDate     Date/Time
   Even               Long Text

What I need to do is create a form to display the records across the page by weekday and have them editable (hence I can't use a crosstab query). This form will actually end up as a subform displayed on top of another sub form that displays bookings records by day. That way I can see (and edit) my Events by week day and see the bookings that have been made by day below it.

I need help figuring out how to create the form to display editable records across the page. Suggestions welcome
0
Rob4077
Asked:
Rob4077
  • 3
  • 2
1 Solution
 
Dale FyeCommented:
I assume that you want to display continuous dates as your column headers, not just the dates entered in your table.

Will you have a [StartDate] on the main form to identify which days to show?

I generally do this using a cross-tab to display the data, and a separate data entry page to actually add or edit the data in the cells.  Then I simply requery or refresh the cross-tab after the changes are made.
0
 
Rob4077Author Commented:
Hi Dale,

Thanks for your suggestion. I started with that option then I decided to simply use an unbound form and use a little VBA to load and update the data when appropriate. That way I could allow changes without having to design another form.

It works fine except I can't get either of the following lines of code to run in the On Activate event of the parent form (frmWeekViewHolder). It works in all the other events (forward one week, back one week, go to a selected week, etc.) but won't work in the On Activate event. ReloadFields is a function that simply loads the variable values into the unbound form. Any ideas or do I need to raise another question?
Forms!frmWeekViewHolder!sfrmEventsSummary.Form.ReloadFields
    Forms("frmWeekViewHolder").Form("sfrmEventsSummary").Form.ReloadFields
0
 
Dale FyeCommented:
Take a look at the sample I put together for you.
EditCrossTab.accdb
0
 
Rob4077Author Commented:
Brilliant. Easy to edit and easy to view. Thanks!!
0
 
Dale FyeCommented:
glad to help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now