How to create a button which opens Form again and which starts parameters again? (1 Viewer)

Status
Not open for further replies.

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Here a link to my DataBase under Access 2007


https://drive.google.com/open?id=1FG14XHMVAGCckkOsudA-Ji1dGHw_1-pm


Hello, I would like the final user can have a button to open search form again. I need this button to reload paramaters of the form.


Name of the formular :



Anzeige Berufsuche Formular, last button on Form (Aktualisieren)


I would like to create a macro with this kind of button which can be bound to this button, in order to start a new search and to load parameters of form again.


Please no VBA, too difficult for me
 

vba_php

Forum Troll
Local time
Today, 01:35
Joined
Oct 6, 2019
Messages
2,880
bambi,

copy your form, called it "form 2", put a new button on your current form, and behind the button click on "macro builder" and set the embedded macro arguments to what you see in the attached image.

this is just an example of how to use a macro to open a search form. this is not a complete solution. you are already using PARAMETERS in the query your form is getting data from, so to say that you want to SEARCH the records and filter them on the popup forum you want doesn't make any sense. the parameter popup that you already have occuring IS a search in it's own right. see attached zip and image.
 

Attachments

  • TeamSolutionsDatenBank - preemptive solution.zip
    299.2 KB · Views: 108
  • embedded instructions.png
    embedded instructions.png
    56.3 KB · Views: 126

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Hello Adam, I put the DataBase under Access 2013 and it seems to work. I created the button and built a Macro behind the button how you explained. When I click on the button, this sends me no records back and Access asks to enter [AnzeigeNummer] which is the PK of Tabelle Anzeige. It displays no records. But it loads the parameters of the form again, asking PK AnzeigeNummer after Beruf and displays no records....maybe shall I do a query different, where the contents of parameters Form is analysed again and compared with existing string in the field Beruf, this would be something like this :


WHERE [Anzeige.PublikationName] LIKE "*" & [Beruf] & "*".


This was the code to display the records which contain the data we want to search.


How can I say to Access to open the form again and to run a search again, with a display of the found data?
 

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Dear Adam, thank you so much to teach me how to make Access run! This is considerably hard for me to understand the code of the Macro but at least I tried to find a solution....maybe if I put in the WHERE Condition the criterias of search this will manage a new search!
 

vba_php

Forum Troll
Local time
Today, 01:35
Joined
Oct 6, 2019
Messages
2,880
How can I say to Access to open the form again and to run a search again, with a display of the found data?
ok honey, upload what you have so far and I'll take a look.
maybe if I put in the WHERE Condition the criterias of search this will manage a new search!
I already told you, doing what you're doing makes no sense, but i'll try to accommodate you the best I can.
 

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Maybe this would be more simple just to close the Form and just open it again!No?
 

vba_php

Forum Troll
Local time
Today, 01:35
Joined
Oct 6, 2019
Messages
2,880
Maybe this would be more simple just to close the Form and just open it again!No?
it doesn't matter bambi. that would make no sense just like doing what you're doing now makes no sense. stand by, I'm looking at your stuff now....
 

vba_php

Forum Troll
Local time
Today, 01:35
Joined
Oct 6, 2019
Messages
2,880
you have not done what I showed you to do my dear. in your recent upload, you only have ONE form in there called "Anzeige Berufsuche Formular". my instructions say to create a NEW form and call it "Anzeige Berufsuche Formular 2". did you read those instructions correctly?

perhaps the better way to do this is for me to upload an example to you that would be a better way to get this done....? you wanna do that? (i'm jumping in the shower now I'm "out of the office" for 20 minutes)
 

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Thank you so much Adam. I am ready to learn how to make things which have a sense with Access!
 

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Adam, the file is too big. I will try a new time with Google drive
 

vba_php

Forum Troll
Local time
Today, 01:35
Joined
Oct 6, 2019
Messages
2,880
i was able to get it via chrome. but i'm seeing that many other people here are reading this thread, so hopefully somebody else will get back to you and help out here if I can't. I'll take a look at your new file in a bit. I'm headed to a resturant.
 

KissBambi

Registered User.
Local time
Today, 08:35
Joined
Nov 29, 2019
Messages
36
Here with zip file
 

Attachments

  • ExampleForMacroBambi.zip
    258.1 KB · Views: 104

moke123

AWF VIP
Local time
Today, 02:35
Joined
Jan 11, 2013
Messages
3,912
KissBambi,

Many of us on the forums will not download from exterior sites. In order to get the most out of your time here you should post your databases here. If the file is too big you should strip out anything not needed to demonstrate the problem at hand, take out or change any confidential information, and zip the file before uploading.

I looked at the example that Adam posted and my first thought is to use a filter rather than duplicating any forms.

if you remove the parameters and criteria in your query you would simply need a button with the following code under it
Code:
Dim strFilter As String
strFilter = "Publikationname  Like  ""*" & InputBox("Beruf") & "*"""
Me.Filter = strFilter
Me.FilterOn = True

No need to duplicate forms. You should try and get over your aversion to code over macros. You will find that code is actually simpler and a lot more flexible.
 

vba_php

Forum Troll
Local time
Today, 01:35
Joined
Oct 6, 2019
Messages
2,880
bambi,

moke's post might be too tough for you to follow, which I assume it is. so, in that case, look at this attachment. this is the FIRST step for you. look at the query "Anzeige Abfrage". you will notice that there is a "IS NOT NULL" statement in the WHERE clause. what this does is force a 0-record result set if a user tries to bypass the parameters by not putting anything in the popup box. tell me if this is something you want first, and then we'll do the next step regarding the 2nd filtered form you want.
 
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom