Talk About Network

Google





Software > Access Forms > Re: Open Re****...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 13 of 16 Topic 46431 of 46786
Post > Topic >>

Re: Open Re****t using current record

by =?Utf-8?B?TWlrZQ==?= <Mike@[EMAIL PROTECTED] > Dec 3, 2008 at 03:40 AM

Hi CW,

Thanks for your patience on this, hopefully I am getting there now.

I entered the Event as you described and there was no highlighted areas
this 
time, however when i come to run the command it says I didn't specify any 
search critera with a FindRecord action.  I am assuming this has something
to 
do with the control on the form that you and Keith have mentioned.  

Just to clarify what i am doing and what i believe you are saying.  Record

is the name of my primary key, which uses the autonumber function, and is 
listed as one of the columns on the query(ie is part of the search
results)  
On the form, I have clicked on properties for the field that contains the 
Record Autonumber and the control source is also Record is this right or
does 
the control come from somewhere else?

"Cheese_whiz" wrote:

> Hi Mike,
> 
> Between is different than equal to.
> 
> Try this:
> 
> DoCmd.OpenRe****t "Holiday Record Card", acViewPreview, , "Record = " & 
> Me.Record & " And [Holiday Start] >= #" & Me.txtText145 & "# And
[Holiday 
> End] <= #" & Me.txtText147 & "#"
> 
> Note:  If Record is the name of a column in your query, you need to
match it 
> to the value of a control on your form.  It SHOULD be something like, as

> Keith suggested:
> 
> "Record = " & Me.ControlName & " And blah blah blah
> 
> CW
> 
> "Cheese_whiz" wrote:
> 
> > Hi Mike,
> > 
> > One thing you might need to do is use brackets around two word field
names.  
> > So something like:
> > Holiday Start
> > 
> > would become:
> > [Holiday Start]
> > 
> > See if that helps.
> > 
> > I've looked back at my syntax and I think it's right assuming the date

> > fields in your query represent fields that are actually date type, and
not 
> > string.  I'll see if I can get a minute a little later to test things
and 
> > verify.
> > 
> > HTH,
> > CW
> > 
> > "Mike" wrote:
> > 
> > > Hi keith,
> > > 
> > > As CW broke this down, i entered the information as per
instructions. record 
> > > is the name of my column within the query and record is also on my
form and 
> > > the txtID (this field is also the primary key) are you saying this
isn't 
> > > right?  As mentioned the first part of the code CW provided worked,
but it 
> > > was the second half that posed the problem as i am needing to
extract data 
> > > between two specific dates that are recorded on the form?  I use a
dropdown 
> > > list by surname and firstname so that i can move between records
easily but 
> > > each record is assigned to a unique number ie the Record.
> > > 
> > > I'll probably kick myself when i've managed to sort this, as i think
it's 
> > > just my misunderstanding.
> > > 
> > > Mike
> > > 
> > > 
> > > 
> > > "Keith Wilby" wrote:
> > > 
> > > > "Mike" <Mike@[EMAIL PROTECTED]
> wrote in message 
> > > > news:FF765003-C540-4848-A122-7EF46CC4E1BC@[EMAIL PROTECTED]
> > > > >
> > > > > it highlighted in red, i then typed this in all one line as you
described,
> > > > > but then it hightlighted the whole lot in red, am i missing
something 
> > > > > simple?
> > > > > The following is exactly how i entered the code:
> > > > >
> > > > > DoCmd.OpenRe****t "Holiday Record Card", acViewPreview, , "Record
= " &
> > > > > Record &" And Holiday Start = #" & Me.txtText145 & "# And
Holiday End = #" 
> > > > > &
> > > > > Me.txtText147 & "#"
> > > > >
> > > > 
> > > > PMFJI.  What is the second "Record" in
> > > > 
> > > > "Record = " & Record
> > > > 
> > > > , a text box on your form?  If so then try:
> > > > 
> > > > "Record = " & Me.Record
> > > > 
> > > > If the data type is Text then you'll need quotes:
> > > > 
> > > > "Record = ' " & Me.Record & " ' "
> > > > 
> > > > Keith.
> > > > www.keithwilby.co.uk 
> > > > 
> > > >
 




 16 Posts in Topic:
Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-11-27 08:05:02 
RE: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-11-27 10:07:01 
RE: Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-11-28 02:31:01 
RE: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-11-28 19:34:01 
RE: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-11-28 19:48:01 
RE: Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-12-01 02:30:01 
RE: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-12-01 06:40:10 
RE: Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-12-02 06:05:01 
Re: Open Report using current record
"Keith Wilby" &  2008-12-02 15:58:19 
Re: Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-12-02 08:33:02 
Re: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-12-02 12:42:03 
Re: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-12-02 13:10:04 
Re: Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-12-03 03:40:01 
Re: Open Report using current record
=?Utf-8?B?TWlrZQ==?= <  2008-12-03 05:27:01 
Re: Open Report using current record
=?Utf-8?B?Q2hlZXNlX3doaXo  2008-12-03 08:09:02 
Re: Open Report using current record
"Keith Wilby" &  2008-12-01 11:51:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
localhost-V2008-12-19 Fri Jan 9 12:33:17 PST 2009.