deleting data ijust in a tab control

N

natalie

for my project i am doing a database and interfaces for a surveying company.

in the form header i have got some data fields such as report number,
address, staff ID etc. on my form in the detail section i have got a tab
control which has different data on each tab such as room details, floor
details etc... is there a way i can create a button which empty's the data
only in the tab control and keeps the header details showing. i want to be
able to create new tab control data but keep the data in the header section.
Many thanks
 
J

John W. Vinson

for my project i am doing a database and interfaces for a surveying company.

in the form header i have got some data fields such as report number,
address, staff ID etc. on my form in the detail section i have got a tab
control which has different data on each tab such as room details, floor
details etc... is there a way i can create a button which empty's the data
only in the tab control and keeps the header details showing. i want to be
able to create new tab control data but keep the data in the header section.
Many thanks

STOP.

Data is *NOT* stored in tab controls.
Data is *NOT* stored in forms.

A Form (with or without tab controls to arrange screen real estate) is just a
window. The data exists in your Tables, and only in your Tables.

What is the structure of your tables?
What is the recordsource of your Form?
What is on the tab pages: controls bound to the main table, subforms, or what?
 
N

natalie

thanks for your reply, it was very quick!
i know data is not stored on the tab control, but i have got a button that
saves the data that is put on the tab control that saves it into the
database. basically, i am creating a surveying report on buildings. twith
his particular form, i have saved all of the details into a database, but if
the user wants to add another room into the database on the same report, i
want the data in the tab to be deleted so i can create a new room but under
the same report.
 
J

John W. Vinson

thanks for your reply, it was very quick!
i know data is not stored on the tab control, but i have got a button that
saves the data that is put on the tab control that saves it into the
database. basically, i am creating a surveying report on buildings. twith
his particular form, i have saved all of the details into a database, but if
the user wants to add another room into the database on the same report, i
want the data in the tab to be deleted so i can create a new room but under
the same report.

I think what you actually want is not to "delete" the data (which implies
permanently and irrevokably deleting the data from your Table), but just to
move the form to display the new, empty record. This can be done using the
builtin navigation buttons with no effort at all, and with only a tiny bit
more effort to create a new command button to move to the new record.

The user will see a blank form (or subform) ready for new data entry.

Bear in mind that a Report in Access jargon is NOT a data entry form and is
not editable - it's a way of printing data out. A Form is what you would use
for this kind of data entry and editing.

I'd still be interested to know your table structure. If you have a one to
many relationship from Buildings to Rooms, then I would hope that you have a
one to many relationship between a table of Buildings (displayed on your
mainform) and a separate table of Rooms (displayed on a subform). My advice is
predicated on this assumption; if the assumption is wrong please post back
with your actual structure.
 
N

natalie

Yeah you are right, that is what I want to do.

My tables and relationships are a little more complicated, but I tried to
simple it down in my initial posting.
For my project, the surveyor will go out to a property and create a
surveyor report. This includes the creation of a report number, selecting
surveyor ID and choosing the property address. In the “detail†section of
the form, it has a tab control which has a different area to select data bout
the room and problems. Such as, the first tab is about what floor it is on,
2nd is about the room, 3rd is about the problems and solutions the surveyor
picks. Once created and saved in the database, a worker will need to create
their work report which is based on this.
On the work report form, the worker selects the property address which then
searches for all of the fields in the Surveyor report and displays them. They
can now see what work needs to be done and where. They have two fields they
can use which is the “solution1done†and “solution2doneâ€. As they complete
the solutions, they tick the checkboxes. This is save din the database.

For my relationships for these two reports, I have:
SurveyorReport:Report number
SurveyorID
SiteID
FloorSelection
RoomSelection
BedroomNumber
Locatoion of work
Problem1
Problem2
Solution
SubSolution
WorkReport:StaffId
ReportNumber
StartDate
EndDate
Solution1Done
Solution2Done
I have got that 1 surveyor can do many surveyor reports, and 1 worker can do
many work report. Both reports are related by their Reportnumber
Sorry it is long winded-my project is hard to describe!
 

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

Top