Tab Form Coding

K

kay

I have created bound form (Tab page) and set ‘Data Entry Property’ to Yes to
enter the data. So the form will open showing blank record. As I don’t want
to show all the records when one opens the form.
But if someone wants to search/view/update the previously entered record,
How should I code the form?

Thanks,
 
J

Jeanette Cunningham

You can have the form in the tab page showing all the records and put a
'New' button up the top.
User clicks 'New' button to open a new form that allows adding new records
(maybe in acDialog, or perhaps hide the base form until the 'add new record'
form closes).
When that form closes, it requeries the base form to add the new record to
its record source.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
K

kay

That’s sound good. So I will create ‘New’ button on the main tab page to add
new record.
Now about View/Update Record:-
as there are thousands of records in the table, I don’t want user to go to
navigate to all the records. Because there will be records by department, by
categories, by users.
And also FYI: I will have different tab pages for All Records, MyRecords,
DeptRecrods etc.
My purpose is that before entering the same record, I want user to check
whether it is preciously entered or not. (my PK is based on two columns – ID
and Status, One ID can have multiple status but Combo (ID + Status) will be
unique).
So in ID filed when user enters the ID and click enter it should show all
the related records. As one ID can have multiple rows, in one tab page its
not possible to show all the records related to that ID, So I want to create
sub form in the main tab page.
So when User enter the ID and click enter, it should show that related
records in sub form and then when user select the one of the records from
that sub form, it should pop up/show all the detail for that record in main
tab page.
So basically
1. How do I code main tab page such as it opens showing blank records.
2. How do I link sub form to Main form ID
3. And How Do I code so when I click on that records it should pop up\show
values in main tab page.

Hope I am able to explain the point.
Appreciate your inputs.

Thanks,
 
J

Jeanette Cunningham

In this sort of situation I usually open a search form first.
User uses the search form to find the record they want.
There is a download sample search form which is easy to adapt.
http://allenbrowne.com/ser-62.html


A double click on a record on the search form will open the details form for
that record and allow editing the data.
The search form can have a button to add a new record and you can also put a
button there to delete a record if you wish.

The details form opened from the search form can have tabs.
With the above setup, you can put subforms on a different tab from the main
form.
Set the link master and link child fields on the subform just the same as
you do when the subform is on a main form - the tab control makes no
difference in this situation.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
K

kay

Thanks , this will help.

Jeanette Cunningham said:
In this sort of situation I usually open a search form first.
User uses the search form to find the record they want.
There is a download sample search form which is easy to adapt.
http://allenbrowne.com/ser-62.html


A double click on a record on the search form will open the details form for
that record and allow editing the data.
The search form can have a button to add a new record and you can also put a
button there to delete a record if you wish.

The details form opened from the search form can have tabs.
With the above setup, you can put subforms on a different tab from the main
form.
Set the link master and link child fields on the subform just the same as
you do when the subform is on a main form - the tab control makes no
difference in this situation.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia







.
 

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