Advanced Search Form with Autocomplete - database

I want to create an advanced search button that is connected to a dialogue form that searches for a specific criteria. When the user enters the criteria they don't have to press anything the matches just come up something like the following, where the original form has a advanced search button
Which then goes on to produce a connected form that shows the criteria and related records according to the letters of first and last names of the people in the database.

Look at the key press event in the form. https://msdn.microsoft.com/en-us/library/office/ff194937.aspx. You can react to that event and re-run your query, then update your results on the form.

Related

Combobox in Form Header to search customer stops working when i close the program and reopen

I create the combobox and choose the 3rd option (to choose from a list on my form). The form was based on the customerT (patientT in this case). I tried several different ways the last of which was to create a query with the patientT and a FullNameQ i created to combine last names and first names. the combo box searches great either way til i close access and re open. then i get the error in the pic attached. pic of form with error message
I have also tried creating a search form and using the wildcard function in the query but everytime i enter the formula in the criteria, Access changes LIKE to ALIKE. Is it supposed to do that? i watched 3 diff videos to copy how they created a search form. I dont see their formula adding the A when they click off the field or hit enter.

ms-access only show records when selecting certain item from dropdown

I use MS-Access 2013 for this project.
Something I'm unable to find is how I can hide and show certain fields when something happens.
Let's be a little less vague. So, I have a dropdown of 5 items. Oral Exam, Written Exam, Exam on PC, External exam and revision.
All fields are the same for almost every possible selection in the dropdown apart from "exam on PC". Then some additional fields should be filled in, in the form. These are PC_Number amongst other things. The fields are "Yes/No" fields and simple input fields.
Is there a possibility to hide them when "exam on PC" isn't selected in the dropdown and show them when "exam on PC" is selected?
Yes it's very possible and very straightforward.
Lets say your drop down field is Field1 and the field you want to hide or not is Field2
Simply add the following code to the AfterUpdate event
If me.Field1.value<>"Exam on PC" then
me.Field2.visible=false
else
me.Field2.Visible=true
end if

Opening Button to open form based on combo box selection

I currently have a MS Access database of members.
I have a form that has a combo box which is populated with just the first and last names of members. (using a test database for now)
What im struggling with is how do i create a button that opens another form i have created but using the selection in the dropdown box to populate the fields in the newly opened form.
When a user from the dropdown box is selected an open is clicked i want it to open the profile form populated with their details.
pictures and access files can be found on my ftp server:
ftp://ftp.legends-gym.co.uk
User: ftpuser#legends-gym.co.uk
Pass: ftpuser
Regards
I can't access ftp site from work so can't see what you've got thus far however, the key bits you want to look at here are:
Add a button to the form and the On Click Event to open your profile form. Something along the lines of docmd.openform "frmProfile", acNormal
You need something to pass the member you've selected in the combo box to the profile form. One way might be to use OpenArgs so have a look at that
You then could use the passed variable in OpenArgs to select the data you want to fill out your profile form.
EDIT...
OK, I've had a look at the file now. Here is what you need to do to fix your problems (and a couple of extra bits which aren't causing an issue but will improve the look and feel).
On the Format of the Home form and the Member Search form, set Navigation Buttons and Record Selector to false. - This removes the unnecessary elements for a "single" form, you're not looking at records.
On the member search form, remove the binding to the members table. - You don't need to bind this form, as the recordsource of the combo is pulling the data required separately. if you look at your form before you change it, you'll notice you've got 1 of 10 records...
Also, remove the filter criteria and set filter on load to No - You were filtering the wrong form.
On the combo box, remove the after update event. - I'm not sure what that was trying to do but its completely unnecessary.
On the command button, add an onclick event which has the following code DoCmd.OpenForm "Profile", acNormal, , "ID = " & Me.Combo361 & ""
Save everything and enjoy. :)
You weren't far wrong with the filter, but it's actually a WHERE clause when opening another form - sorry, my bad misdirection. What you were doing was filtering the original form - ie the member search form. Also, you don't need to put ' quotes around the ID, it's a number not a string.
If you have problems I can probably host this fixed version somewhere for you to download.

Angular UI-Grid: Clear All Filters with external filtering doesn't refresh rows

I'm using the external filtering and paging features of angular-ui-grid (v3.0.7) to filter and display my data. When I click on the built-in "Clear All Filters" button the filter text boxes get cleared but the data doesn't refresh, which should take me back to my original data set before it got filtered.
Before I updated to v3.0.7, I had my own custom button to clear the filters which, when clicked, called my own function that called the gridApi.grid.clearAllFilters and then pulled the data again so my data would be back the way it was before it got filtered.
Can I get this built-in "Clear All Filters" button to do somehow do the same thing or can I at least hide this button so that I can add my custom button back?
Okay I figured out my issue. I had changed the code so that the calls to the server wouldn't happen until the user clicked the Enter key, instead of each character they typed. This prevented the Clear All Filters button from doing it's job. I've since removed the logic to check for the Enter key and all's well now.

displaying data in textboxes based on

I'm not quite sure where to begin with this. This is basically how I'm trying to get it to work. I will enter the ID of a Hire Record in a textbox, hit the show hire record at which point it will materialise that hire records details in their associated textbox fields.
I attached a screenshot of the form in question. I can also create a new record as you may be able to see by typing in the details and hitting create record (this is not a problem, i already understand how to do this), but I also want to be able to display an existing records details in the textboxes again. Yes I just repeated myself but I just thought I'd try clarify my intentions further :P
http://imageshack.us/photo/my-images/189/hirerecord1.png/
Anyway, how should I go about doing this? Thank you so much for your help.
I do this slightly differently on most of my forms. First off, when a form opens, I bind it to the data (data set, or whatever). I display whatever record I define as the defaults (generally the last record entered. If I want a new record, I have a button that is clicked that creates a new record in the data set and moves my form to that record. Now you can enter your data and handle your edits, saves, etc.
As far as the pulling up a record by typing in a field I believe you could do this with one text box, but I took the easy way out and used two text boxes that are exactly the same size and location. When your form is displaying data, handle the OnClick event for the field bound to the ID. Hide the bound text box and display the duplicate that is unbound. For that text box, handle the OnValidate event and set it to validate on the enter key. The user can then type in the ID and hit enter. You then get the ID they want from the unbound text box, clear it and hide it and cause your form to navigate to the appropriate record.
Jim

Resources