search form

Nick123

Registered User.
Local time
Today, 06:54
Joined
May 11, 2007
Messages
11
I have 3 tables namely master, Trans and archive. Master table contains all the records. Trans table contains records which are issued to any user where as Archive table contains the records which are above 90 days old.

Table structure is as follows.

Master Table -> Document type, Document number, document serial number, description, receive_date.

Trans Table  Trans ID , Trans type , Doc num , Issue Date, Return date, issued to , issued by.

Archive Table  it contains all the fields as that of master table except archive_number. (All those records which crosses 90 days limit in master table get transferred to archive table).

I have a form that contains 2 textbox, 2 labels and 1 command button. The form is basically a search form that helps to search record from database.

What I need is when a user click on submit button the record will first search in archive table. If record exist is archive table then user will get a message “Records archive under archive number <value of archive number>”. In case if the record is not available in archive table then it ill search in Trans table. If record exists in Trans table then user will get a message “Record already issued”. If records do not exist in Archive and Trans table then it will show the record from master table.

Appreciate any help on this.
 
I may be missing something here, but I don't see the point of the archive table. You can pull out records less than 90 days from the main table by using a date range query. It's far easier to search one table than two.

There are many posts on search functions - do a search to find them.

Col
 

Users who are viewing this thread

Back
Top Bottom