CrossTab Manipulation

  • Thread starter Thread starter DanielWalters6
  • Start date Start date
D

DanielWalters6

I'm working on a CrossTab Query
The crosstab shows a mini timetable and looks almost exactly how I want
(work in progress)

I would like to be able to edit the data returned from within the CrossTab
Query's output and it make the relevent changes to the table structure I have
in place - as if it was a form...?

Any ideas on how I can display this on a form, then when closing the form
updates the table data?

Thank you
 
You will not be able to edit any text boxes bound to fields from a crosstab.

One workaround is to add an unbound text box to your form, behind the others
(Format | Send To Back.) In the Enter event of each of the text boxes bound
to the crosstab, copy the Value to the unbound text box, set its Left and
Width so it is the same as the text box that just got focus, and SetFocus to
the unbound box (which has the effect of jumping it in front of the bound
text box.) The user can then type into an unbound box (though they don't
realize it's not the bound one.)

You then have the job of writing code in the AfterUpdate event procedure of
the unbound box, to write to the correct field of the correct record (e.g.
execute an UPDATE query statement.) In practice, there's a bit more to it
than that, because you have to requery the form (so it hears about the new
value), and find the correct record again. You also have the job of handling
the Tab/Enter or Shift-Tab to move to the correct control next.
 
Thank you for your help.

It does sound quite complicated, but I do get the jgist of what you're
trying to describe.

Can you suggest any other way in which I could tackle the same task -
displaying a timetable and storing the data within an access database - Any
ideas on how calendars would do this? - This is essentially what I want to
do, but I would like to build on it...

Thank you for your help
 
Right: it's not exactly a beginner-level task.

The alternative might be use a simple form to enter the data. Perhaps a
typical subform with controls for:
[the date] [the task]
on each row. You can then use the crosstab approach to print out the data
with the view that you want.

Duane Hookom has samples of how to create reports like that:
http://www.access.hookom.net/Samples.htm
 
Thank you for all your help.

I am going to have a go (with some expert help from a friend) at the first
method... expect lots of posting in these forums!

--
Dan Walters


Allen Browne said:
Right: it's not exactly a beginner-level task.

The alternative might be use a simple form to enter the data. Perhaps a
typical subform with controls for:
[the date] [the task]
on each row. You can then use the crosstab approach to print out the data
with the view that you want.

Duane Hookom has samples of how to create reports like that:
http://www.access.hookom.net/Samples.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top