Access multiple rows in a form using a search box - forms

I hava a form which I search data in a table. It has a textbox to input the data. I want to search for and a button do the search.
It has the design below:
[search box][Search Button]
[ text box ] <-- this field shows the data I've insert in search box and search using the Search Button
I've nailed it using macros, it works perfectly, but it only show the first data, not all.
e.g: [Ann ][SB]
[Anna Alfred]
I type "Ann" and the press the search Button [SB] and in the text box it appear "Anna Alfred".
But I have more than one Anna! I have Anna ALfred, Anna Portland, Anna Smith, ...
My doubt is: can I show multiple items in this form?
E.g: [Ann ][SB]
[Anna Alfred ]
[Anna Portland]
[Anna Smith ]`
When I'm not searching, I need it to show all the items in a table with all the names in the table,
when I'm searching I need it to show all the items that contains the data I'd input in the searchbox.

Related

How to create "Go To Next" record button in Access Form that references an alternate form

In my Access dB, I have a Form ("frmSearch") with a Subform ("subFrmData") that references a query ("qryDynamicData").
The Main Form has 6 drop downs that filter the data table in the Subform. The combo boxes are cascading so that once you select one, the entries that appear in the remaining combo boxes are only those entries in the query that correlate to the first selection. The goal is to keep making the data in the Subform data table shorter and shorter. Here are the fields in the combo boxes:
Region
Account Executive
Manager
Engineer
Stage
Project Number ("ProjectSLCT")
When the user filters down to where the list of projects they are looking at is small enough, they use the final combo box ("Project Number") to select an entry from the table. Doing this brings up another form ("MPC_ProjectNotes") as a pop-up form where they can keep track of project specifics. The event looks like this:
DoCmd.OpenForm "MPC_ProjectNotes", , , "Project_Number= '" & Me.ProjectSLCT.Value & "'"
I want to create a Next Record button on the "MPC_ProjectNotes" form that would in effect allow them to run through the steps of selecting the next item in the ProjectSLCT dropdown and thereby relaunching the MPC_ProjectNotes form with the next item from the combo box (and from the datasheet in "subFrmData") without having to close the MPC_ProjectNotes form and adjust the combo box.
Any thoughts? I don't really even know what to google to get myself pointed in the right direction on this. It seems "Next Buttons" aren't generally setup to work across forms.
Ok, here is what I would suggest:
In place of launching form MPC_ProjectNotes to ONE reocrd?
Why not launch the form with the SAME criteria and list as your combo box ProjectSLCT.
Now, we would of course land in the first reocrd of ProjectSLCT. but that's probably ok!
Now say if ProjectSLCT was NOT on the first record? Then we would simple have to add one extra step: move the form to the right record.
So, the logic is this:
Launch the 2nd form to the same "list" as the combo box.
Move the 2nd form to the SAME item currently selected in the combo box.
Now, you don't even have to write a next/previous button, but can simple display the built in navigation buttons. Since the form is LIMITED to the same list, then regular navigation in that form will work and work without you having to write any code!
So someplace in your first form, you EVENTUALLY wind up with this:
combobox data source = select * from tblWhoKnows where (CRITERA GOES HERE!!!).
So, now we simple launch the 2nd form with this:
DoCmd.OpenForm "MPC_ProjectNotes", , , (CRITERA GOES HERE!!!)
Now the form is loaded with the SAME list. We just this extra line of code to move/jump the form to the current selected row in the combo.
forms("MPC_ProjectNotes").RecordSet.FindFirst "Project_Number= '" & Me.ProjectSLCT.Value & "'"
So we open the form to the "list", and then jump to the corrent combo box selected. The result is a form that you can navagate teh combo list, but we jump/started out on the same combox selected item from that list in the form.
So the code will look something like this:
DoCmd.OpenForm "MPC_ProjectNotes", , , (CRITERA GOES HERE!!!)
Forms("MPC_ProjectNotes").RecordSet.FindFirst "Project_Number= '" & Me.ProjectSLCT.Value & "'"
You will of course "change" the above "CRITERA" to the SAME criteria you used in your code to fill out the last combo box.

How to hyperlink a document property field in word 2016?

Document properties are fields that can be used throughout microsoft word: https://support.office.com/en-us/article/view-or-change-the-properties-for-an-office-file-21d604c2-481e-4379-8e54-1dd4622c6b75
Typically I use these fields throughout my document so changing the document property will change all instances of that field throughout my document. This is great, however, when one of the fields is "Company Email" I not only want the text to change to employee#company.com but I would like to have that field hyperlinked to employee#company.com so that the user can click it in order to send an email.
Edit: (Info from comments)
I have tried to insert a hyperlink, hit alt-f and embed a docproperty via the instructions from a similar thread: stackoverflow.com/questions/17428891/…. But could not get that to work properly.
The following works for me, in a quick test (you'll need to substitute the name of the Document Property you're using):
{ HYPERLINK "mailto:{ DocProperty Email }" }
When I Ctrl+Click this it creates a new Email to the address.
For readers unfamiliar with inserting field codes: The wavy bracket pairs must be inserted using Ctrl+F9. Alt+F9 after to switch from field code to field display.

How do setup msword document to have different print section?

I want to setup a word document which has several chapters. For a particular set of readers (eg my boss), I want to only print to pdf chap 1-5 and for another set of readers (eg my customers), I want to print to pdf out chap 6-10.
Is this possible with MS-word?
edit: elaboration.
First you will need a way to get who is the user and determine to which part of the document he has access (you can use the WNetGetUser API in the microsoft Mpr.dll), then you can show and hide the different sections of the document. For the second part the easiest way is to create bookmarks for the different chapters of your document and hide/show them using:
ActiveDocument.Bookmarks("bookmark01").Range.Font.Hidden = True 'to hide text
ActiveDocument.Bookmarks("bookmark01").Range.Font.Hidden = False 'to show text

filemaker pro 7 email entry form for trade shows data collection

I have Filemaker pro 7 (yes a million years old)
I need help to make a very simple email data collection form for trade shows I attend. Lots of people need this kind of form.
I have done it! It has a space to type your email and then if you CLICK the onscreen “Submit” button it opens up a new record so the next person can enter their email. Simple and sweet.
Yet, what I really want to do is make it that when they hit the keyboard “ENTER” key it opens a new record. So the customer doesn’t have to use the mouse. Why? Because everyone hits the keyboard Enter key automatically. That is what is intuitive. This would make me very very happy!
To really make me ecstatic I would love it if they could type their email once, hit enter and then go to ANOTHER fill-in box on the same page where they would type their email again - to make sure that they spelled it correctly. If the two boxes didn’t match, the program would ask them to try again. If the two entries matched, then when they hit the keyboard Enter key it would open a new record (like above).
Can anyone help me do this?
That could be difficult in FileMaker 7. If you consider upgrading to version 11 or 12 it would be much easier. In the later versions you have a feature called ScriptTriggers that would be very useful for your solution.
The only real way I can think of is if you write a script with a Custom Dialog that shows two fields, one for the email and the other for re-typing the email. You then put this dialog in a loop so it keeps asking for a new email until you click "cancel"
You will need two global textfields for this, globalText1 and globalText2
The script could look something like this.
[Set Field globalText1; ""]
[Set Field globalText1; ""]
[Loop]
[Show Custom Dialog; "Enter new Email"; globalText1; globalText2]
[If get(lastMessageChoice) = 2]
[Exit loop if: True]
[Else if globalText1 <> globalText2]
[Show custom dialog; "You must type the same E-mail in both fields"]
[Else]
[Create new Record]
[Set field "Emailadress"; globalText1]
[Commit record; Do not display dialog]
[Set Field globalText1; ""]
[Set Field globalText1; ""]
[End if]
[End Loop]
Note that the dialog with the two input fields needs two buttons. Button 1 is "OK" and button 2 is "Cancel". The second dialog is only a warning and needs 1 button that is "OK" and no inputfields.
Hope this helps
You can do as Kalle recommended but you won't need to use the Dialog Box.
Put the two fields on a layout and go to that layout before entering the loop.
Replace the Dialog Box with a Pause script step. Set the fields.
Set the fields to tab out when the user presses Enter or Return.
You may find that using a layout is more desirable if and when you move to FMP12.

How to add a simple text label in a jqGrid form?

When using the Add or Edit form from the pager I'm wondering how a simple static label can be added in the form without it creating any additional columns in it's affect on colNames[]'s and colModel[]'s. For example I have a quite simple typical Add form which opens from the pager containing a few label's and form elements: Name, Email, Web Site, etc., and then the lower section of the form has a few drop down menus containing the number 1 through 10 with the idea being to ask the user to pick a value between 1 and 10 to put a value on the importance to them about the product or service which is listed beside it. Just above this section I want to add some text only to give a brief instruction asking the user to "Choose the importance of the following products and services using the scale: [1=Low interest --- 10=Very high interest]". I cannot figure out how to get a text label inserted in the form without having to define a column with a formoption{} etc which is not needed for just some descriptive text. I know about the "bottominfo: 'some text'" for adding text to the bottom of the form but I need to insert some text similar to that mid-way (or other positions) in the form without it affecting the tabular structure of the grid. Is this even possible? TIA.
You can modify Edit or Add forms inside of afterShowForm. The ids of the form fields are like "tr_Name". There consist from "tr_" prefix and the corresponding column name.
I modified the code example from my old answer so that in the Add dialod there exist an additional line with the bold text "Additional Information:". In the "Edit" dialog (like one want in the original question) the input field for one column is disabled. You can see the example live here. I hope that a working code example can say more as a lot of words.