C
Christine Wurtz via AccessMonster.com
Hello
Don't know if what i'd like to do is even possible, and my skills in VBA
being microscopic, i submit my request, and maybe someone will be able to
help.
I have following :
Table : TBLSites with fields SiteCode SiteName BeginDate EndDate, and
entries like for example :
PBS1 | Perth Boy School | 01/01/05 | 31/01/05
PBS2 | Paris Boy School | 15/01/05 | 30/06/05
PBS3 | Perth Boy School | 05/05/05 | 07/07/05
Form : F-SiteSearch (unbound) with 2 unbound textboxes SiteCode and
SiteName. THis is a form used to enter values which will be retrieved by
query Q-SiteSearch
Query : Q-SiteSearch (based on TBLSites) with all fields of TBLSites and
following criteria :
on SiteCode : Like[Forms]![F-SiteSearch]![SiteCode] or Is Null
on SiteName : Like ("*" & [Forms]![F-SiteSearch]![SiteName] & "*") or Is
Null
Typically my users will search sites on a part of the name, for example
keyword "boy" or keyword "perth". There is a form F-SitesResults which is
going to list the result.
Form : F-SiteResults, based on Q-SiteSearch (and for each record i have a
command button which opens another form for more info from my db).
MY QUESTION :
Typicall someone will open F-SiteSearch, enter a part of the name in
SiteName, click OK -> this, thru the query, opens the form F-SiteResults
with matching records. Example keyword "boy" will render all 3 records from
TBLSites.
What i would like to do is set a command button called "select" which will
copy the value of SiteCode from this form, close the F-SiteResults form,
come back to F-SiteSearch and paste the selected SiteCode in the field
SiteCode from F-SiteSearch.
So, very generally, with form2 based on form1 (and a request), is it
possible via a select button to populate a field of form1 and close form2 ?
Thank you very much for any help
Christine
Don't know if what i'd like to do is even possible, and my skills in VBA
being microscopic, i submit my request, and maybe someone will be able to
help.
I have following :
Table : TBLSites with fields SiteCode SiteName BeginDate EndDate, and
entries like for example :
PBS1 | Perth Boy School | 01/01/05 | 31/01/05
PBS2 | Paris Boy School | 15/01/05 | 30/06/05
PBS3 | Perth Boy School | 05/05/05 | 07/07/05
Form : F-SiteSearch (unbound) with 2 unbound textboxes SiteCode and
SiteName. THis is a form used to enter values which will be retrieved by
query Q-SiteSearch
Query : Q-SiteSearch (based on TBLSites) with all fields of TBLSites and
following criteria :
on SiteCode : Like[Forms]![F-SiteSearch]![SiteCode] or Is Null
on SiteName : Like ("*" & [Forms]![F-SiteSearch]![SiteName] & "*") or Is
Null
Typically my users will search sites on a part of the name, for example
keyword "boy" or keyword "perth". There is a form F-SitesResults which is
going to list the result.
Form : F-SiteResults, based on Q-SiteSearch (and for each record i have a
command button which opens another form for more info from my db).
MY QUESTION :
Typicall someone will open F-SiteSearch, enter a part of the name in
SiteName, click OK -> this, thru the query, opens the form F-SiteResults
with matching records. Example keyword "boy" will render all 3 records from
TBLSites.
What i would like to do is set a command button called "select" which will
copy the value of SiteCode from this form, close the F-SiteResults form,
come back to F-SiteSearch and paste the selected SiteCode in the field
SiteCode from F-SiteSearch.
So, very generally, with form2 based on form1 (and a request), is it
possible via a select button to populate a field of form1 and close form2 ?
Thank you very much for any help
Christine