Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: Re****t que...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 30182 of 31596
Post > Topic >>

Re: Re****t question

by Salad <oil@[EMAIL PROTECTED] > May 6, 2008 at 09:15 AM

zufie wrote:

> I can't figure out how a re****t on a form (form contains two text
> boxes for beginning and end dates of re****t) and a drop down combo box
> also on the same form (that allows for selection of county) are
> connected to produce a re****t sorted by county?
> 
> I seek, but do not find how this works.
> 
> Grateful for any ideas you may have.
> 
> Zuf
> 
I'd add a command button to display the re****t.

Then I might have code similar to:
	Dim strF As String

	If Not IsNull(Me.FromDate) Then
		strF = "TableDateFld >= #" & Me.FromDate & "# And "
	Endif
	If Not IsNull(Me.To) Then
		strF = strF & _
			"TableDateFld <= #" & Me.ToDate & "# And "
	Endif
	If Not IsNull(Me.ComboBoxName) Then
		strF = strF & _
    		  "TableDateCntry = '" & Me.ComboBoxName & "' And "
	Endif
	'remove the 'And' at the end
	If strF <> "" THen strF Left(strF,len(strF)-5)
	Docmd.OpenRe****t "Re****tName",,,strF

In the above example I permit records greater date, less than date or 
within date range.

As far as sorting it, open re****t in design mode and select 
View/Sorting&Grouping from the menu.

Simple
http://www.youtube.com/watch?v=mqXVghIWuws&NR=1
 




 2 Posts in Topic:
Report question
zufie <john.marruffo@[  2008-05-06 08:32:35 
Re: Report question
Salad <oil@[EMAIL PROT  2008-05-06 09:15:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:43:44 CST 2008.