Tabbed Search Forms (1 Viewer)

Coolzie1

Registered User.
Local time
Today, 21:18
Joined
May 13, 2017
Messages
11
Hi All,

I am quite new to Access and VBA so I don't know whether this is a quite simple problem and I am just missing something?

To give a basic idea of what I am needing is a tabbed form with 3 tabs at the moment to show 3 different tables on a continuous form kind of screen and search functions for each where check boxes can be used to filter the tables depending on what is being searched for.

I have the screen set up currently for one table in the main form with the header showing; the titles for each column, a text box for searching, a search button, a show all button and then 2 check boxes to filter between searching for agents or managers.
 

June7

AWF VIP
Local time
Today, 13:18
Joined
Mar 9, 2014
Messages
5,423
To give you an idea of how to structure a form with searching functionality, review http://www.allenbrowne.com/ser-62.html

Whether you really need search capability for each subform depends. Is the main form bound? Do the subforms have a relationship to the main form data? Perhaps you just need to set the Master/Child links for the subforms and apply filter to the main form. That would be a conventional arrangement.
 

Coolzie1

Registered User.
Local time
Today, 21:18
Joined
May 13, 2017
Messages
11
Hi,

Thank you for your fast response, I tried to reply last night however after typing out my response I got a lovely message on the screen saying "No internet connection" so it was a waste of about 20 minutes responding.

I have looked at the link that you have posted and I don't think it will work with what I am attempting to do. I have 3 different tables with around 15000+ records on 2 of them and about 20 records on another and I am trying to put them in a form so they are together rather than being spread out in different spreadsheets as they currently are ( I know it would be somewhat simple to put all 3 in one excel sheet with 3 pages and leave it at that haha) however the tab function was meant to be a way to organize the pages so an agent can just go onto the one form and click whichever tab it is they want for which table it is they are wanting to search on and then type in the search box for what they want.

I am quite new so I don't know how to properly manage the relationships, there should not be any links between the data in each table if this is what you mean? and I did not have any sub form set up but when I have attempted this by creating a new form and putting a sub form in then putting the fields in I dont know how to set up a search function that links to this table as my original has the table bound to the main form body?

I dont know whether I am explaining this well enough to get what I am trying to do or what is happening but any help is appreciated :)
 

June7

AWF VIP
Local time
Today, 13:18
Joined
Mar 9, 2014
Messages
5,423
You could provide the db for analysis by attaching to post. Click 'Go Advanced' at bottom of post editor window then use the Attachment Manager.
 

isladogs

MVP / VIP
Local time
Today, 21:18
Joined
Jan 14, 2017
Messages
18,186
As you have less than 10 posts, you will need to zip your db to upload it.
You should also remove almost all data leaving just enough records for any of us to understand what is needed.
 

Coolzie1

Registered User.
Local time
Today, 21:18
Joined
May 13, 2017
Messages
11
I have stripped all of the unnecessary data, all that is left it the main menu with the button to the search screen and it currently works the same as it does when I have all of the data I need in it correctly in place. I will do this once I get a chance tonight, thank you all for the help :)
 

Coolzie1

Registered User.
Local time
Today, 21:18
Joined
May 13, 2017
Messages
11
Hi all,

Please find attached the database with rough tables set up for 2 of the searches. I have left the main menu on there, it is the bottom button (the only one which will work anyway and is labelled as AgentSearch) any help is appreciated, if this gives more of an idea of what I am going for and it just isn't going to work without massive amounts of VBA/macros then I am open to suggestions of how to resolve it a different way :) .

Regards
Ben
 

Attachments

  • DatabaseExample.accdb
    724 KB · Views: 83

June7

AWF VIP
Local time
Today, 13:18
Joined
Mar 9, 2014
Messages
5,423
Your OP says your form is to show 3 tables. Your db has only 2 tables.

The form can search/filter for agents or it can search/filter for managers in any one action. The checkboxes should be mutually exclusive, only one should be allowed to be checked at a time. Radio buttons in an OptionGroup control is best for this.

You are not using tab control as it is intended and so far I see no need for it on your form. Review https://www.techonthenet.com/access/tutorials/tabcontrol2007/tabcontrol01.php
 

Coolzie1

Registered User.
Local time
Today, 21:18
Joined
May 13, 2017
Messages
11
Yeah I originally said there was 3 tables because I will have 3 plus tables which will be used in the final search form however for the purpose of finding out how to fit the 2 search screens into the one form and then I could work from there to add more as required was why I removed the other one.

I understand that this is not not normally how the tabbed form function is normally used however this is where I am having problems because I cannot seem to get the search function I am using now to work when in a subform?
 

Users who are viewing this thread

Top Bottom