A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Have a form populate a field from a query



 
 
Thread Tools Display Modes
  #1  
Old August 31st, 2006, 09:01 PM posted to microsoft.public.access
Guy Story
external usenet poster
 
Posts: 1
Default Have a form populate a field from a query

I am trying to create a shortcut for a scheduling database. The users
need to be presented with a drop down box that gives them a list of last
names. That I have done. When the user clicks on the OK button, I need
it to populate a field and apply a filter. The problem I have run into
is getting the form to open with the "Filter by Form" applied then have
the result from the selection box be populated in the last name field
then apply the filter so we can get the result.

If all I wanted was a report, that is easy and I have done that, but I
want the form to appear with the filter run and displaying results. I
would think the code would be the same up to the point of
DoCmd.OpenReport and swap that with DoCmd.OpenForm. That even works but
getting the form to open with Filter by Form inplace, take the data from
the query then apply the filter. I have used the examples from
fontstuff.com for Customizing Access Parameter Queries (BTW the tip
works like a charm for a date range search report I wanted) but not sure
if there is VB code that can open a form, apply Form by filter, insert
my query result, then apply the filter.


Any suggestions?

TIA

Guy
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.