PC Review


Reply
Thread Tools Rate Thread

Button form control does not work

 
 
Thanatosuk
Guest
Posts: n/a
 
      8th Apr 2010
I have spent over 5 hours trying to get the button wizard to do a simple thing.
Open a form and show data in that form that matches the name in the form
where the button is
but when i follow the wizard the button allways go to the first entary in
the second form

eg
i have the form (form1) open on emma (record 3) and want to open a second
form that also contains emma the wizard puts the following in to a macro
form2, Form, , "[Full Name]=" & [Full Name], , Normal but when i test the
button it open the second form with the first record which is not emma
why does it not work?
any ideas?

 
Reply With Quote
 
 
 
 
Jeanette Cunningham
Guest
Posts: n/a
 
      8th Apr 2010
If you are putting the button on a bound form, the button wizard will ask
you
1. if you want to open the form and find specific data to display
or
2. if you want to show all records.

To open at the record for emma, choose the first option above in the wizard.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Thanatosuk" <(E-Mail Removed)> wrote in message
news:57CC3DC9-9E51-4F80-948A-(E-Mail Removed)...
>I have spent over 5 hours trying to get the button wizard to do a simple
>thing.
> Open a form and show data in that form that matches the name in the form
> where the button is
> but when i follow the wizard the button allways go to the first entary in
> the second form
>
> eg
> i have the form (form1) open on emma (record 3) and want to open a second
> form that also contains emma the wizard puts the following in to a macro
> form2, Form, , "[Full Name]=" & [Full Name], , Normal but when i test the
> button it open the second form with the first record which is not emma
> why does it not work?
> any ideas?
>



 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      8th Apr 2010
I'm assuming that Full Name is, in fact, a text value containing the name of
the individual. If that's the case, you need to enclose the value in quotes:

"[Full Name]=""" & [Full Name] & """"

(That's three double quotes in row in front, and four double quotes in a row
after.)

If you were dealing with other than names, you could use

"[Full Name]='" & [Full Name] & "'"

(exagerated for clarity, that's "[Full Name]= ' " & [Full Name] & " ' ")

The reason you can't use that for names is because of the possibility of
apostrophes in the name (like O'Riley)

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Thanatosuk" <(E-Mail Removed)> wrote in message
news:57CC3DC9-9E51-4F80-948A-(E-Mail Removed)...
>I have spent over 5 hours trying to get the button wizard to do a simple
>thing.
> Open a form and show data in that form that matches the name in the form
> where the button is
> but when i follow the wizard the button allways go to the first entary in
> the second form
>
> eg
> i have the form (form1) open on emma (record 3) and want to open a second
> form that also contains emma the wizard puts the following in to a macro
> form2, Form, , "[Full Name]=" & [Full Name], , Normal but when i test the
> button it open the second form with the first record which is not emma
> why does it not work?
> any ideas?
>



 
Reply With Quote
 
Thanatosuk
Guest
Posts: n/a
 
      9th Apr 2010
Thanks for the help but both dont work
even for other fields in the form
its aproblem i'v come across before the wizzards return the syntax error in
access 2003 i'll give up and try something else
thanks again


"Jeanette Cunningham" wrote:

> If you are putting the button on a bound form, the button wizard will ask
> you
> 1. if you want to open the form and find specific data to display
> or
> 2. if you want to show all records.
>
> To open at the record for emma, choose the first option above in the wizard.
>
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
> "Thanatosuk" <(E-Mail Removed)> wrote in message
> news:57CC3DC9-9E51-4F80-948A-(E-Mail Removed)...
> >I have spent over 5 hours trying to get the button wizard to do a simple
> >thing.
> > Open a form and show data in that form that matches the name in the form
> > where the button is
> > but when i follow the wizard the button allways go to the first entary in
> > the second form
> >
> > eg
> > i have the form (form1) open on emma (record 3) and want to open a second
> > form that also contains emma the wizard puts the following in to a macro
> > form2, Form, , "[Full Name]=" & [Full Name], , Normal but when i test the
> > button it open the second form with the first record which is not emma
> > why does it not work?
> > any ideas?
> >

>
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SAME MACRO DON’T WORK ON (ActiveX Control) BUTTON BUT WORKS ON (From Control) BUTTON K Microsoft Excel Programming 3 16th Jun 2008 11:34 PM
Control Power off button does not work on WM5 Michal Rizek Microsoft Dot NET Compact Framework 0 29th Nov 2007 05:54 PM
Closing Form control vs Button control for Exiting =?Utf-8?B?TGVzbGll?= Microsoft Access Form Coding 3 1st Jul 2005 10:20 PM
Custom button from a Control class doesn't appear as a choice for OK/Cancel button in a Form properties CroDude Microsoft C# .NET 3 28th Jun 2005 06:27 PM
Calling a form function from a button click on a user defined control placed on the form Scott Schade Microsoft C# .NET 3 20th Feb 2004 01:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 PM.