Sign Up |  Live StatsLive Stats    Articles 35,345| Comments 159,790| Members 17,820, Newest waheguruhelpme| Online 190
Home Contact
 (Forgotten?): 
    Sikhism

   
                                                                     Your Banner Here!    

send Keys problem

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 400 USD, Received: 35 USD (9%)
Please Donate...
Related Topics...
Thread Thread Starter Forum Replies Last Post
The Ten Keys To Lasting Happiness Soul_jyot Spiritual Articles 2 07-Mar-2008 23:35 PM
Primary Keys LurfysMa Information Technology 100 28-Jul-2006 08:38 AM
Keys - I Keep losing my Keys, Any Ideas? TheNovice Information Technology 1 28-Jul-2006 08:18 AM
Send Keys Max Information Technology 1 28-Jul-2006 08:12 AM
Send email from data access form - Subject Problem Michael J. Earl Information Technology 5 07-Nov-2005 11:26 AM


Tags
send, keys, problem
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:34 AM
Halocarbon's Avatar Halocarbon
Guest
 
Posts: n/a
   
   
send Keys problem

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I have a database that when my users open a form a macro runs to put the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/13077-send-keys-problem.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
focus in a box called "Lot Number". The form is named "ETFA". Once the focus
is in the box the macro uses the send keys function {down} to select the
number in the box. When the form first opens the focus is set correctly, but
the send keys function does not work. I can close the form and immediatly
reopen it and the send keys function works. What is wrong and can I do this
in another way other than the send keys function?

*








 
Do share your immediate thoughts or reactions on this issue? We value your views! Login Now! or Sign Up Today! to share your views with us.. Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:34 AM
strive4peace's Avatar strive4peace
Guest
 
Posts: n/a
   
   
Re: send Keys problem

Instead of using SendKeys, simply assign the value to the combo

me.combo_controlname = value


Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day

remote programming and training
strive4peace2006 at yahoo.com

*

Halocarbon wrote:
> I have a database that when my users open a form a macro runs to put the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
> focus in a box called "Lot Number". The form is named "ETFA". Once the focus
> is in the box the macro uses the send keys function {down} to select the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
> number in the box. When the form first opens the focus is set correctly, but
> the send keys function does not work. I can close the form and immediatly
> reopen it and the send keys function works. What is wrong and can I do this
> in another way other than the send keys function?

Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:34 AM
Halocarbon's Avatar Halocarbon
Guest
 
Posts: n/a
   
   
Re: send Keys problem

I can't assign a value to this text box because it changes every time the
form opens. This is a number that increases by 1 each time.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077

"strive4peace" <"strive4peace2006 at yaho" wrote:

> Instead of using SendKeys, simply assign the value to the combo
>
> me.combo_controlname = value
>
>
> Warm Regards,
> Crystal
> Microsoft Access MVP 2006
>
> *
> Have an awesome day
>
> remote programming and training
> strive4peace2006 at yahoo.com
>
> *
>
> Halocarbon wrote:
> > I have a database that when my users open a form a macro runs to put the
> > focus in a box called "Lot Number". The form is named "ETFA". Once the focus
> > is in the box the macro uses the send keys function {down} to select the
> > number in the box. When the form first opens the focus is set correctly, but
> > the send keys function does not work. I can close the form and immediatly
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
> > reopen it and the send keys function works. What is wrong and can I do this
> > in another way other than the send keys function?

>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:34 AM
strive4peace's Avatar strive4peace
Guest
 
Posts: n/a
   
   
Re: send Keys problem

Hi Halo,

if what you want it the first item in the list

'list has heading row
me.controlname = [controlname].[ItemData](1)

'list does not have heading row
me.controlname = [controlname].[ItemData](0)

do this on the LOAD event, not the Open event...

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077

remote programming and training
strive4peace2006 at yahoo.com

*

Halocarbon wrote:
> I can't assign a value to this text box because it changes every time the
> form opens. This is a number that increases by 1 each time.
>
> "strive4peace" <"strive4peace2006 at yaho" wrote:
>
>
>>Instead of using SendKeys, simply assign the value to the combo
>>
>>me.combo_controlname = value
>>
>>
>>Warm Regards,
>>Crystal
>>Microsoft Access MVP 2006
>>
>> *
>> Have an awesome day
>>
>> remote programming and training
>> strive4peace2006 at yahoo.com
>>
>> *
>>
>>Halocarbon wrote:
>>
>>>I have a database that when my users open a form a macro runs to put the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
>>>focus in a box called "Lot Number". The form is named "ETFA". Once the focus
>>>is in the box the macro uses the send keys function {down} to select the
>>>number in the box. When the form first opens the focus is set correctly, but
>>>the send keys function does not work. I can close the form and immediatly
>>>reopen it and the send keys function works. What is wrong and can I do this
>>>in another way other than the send keys function?

>>

Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:34 AM
Halocarbon's Avatar Halocarbon
Guest
 
Posts: n/a
   
   
Re: send Keys problem

I don't think that will work either. This lot number is not in a list the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
database does a calculation to generate this number. The lot number is not
part of a list. Our lot numbers are generated through a query function:
Max Of Sample ID: Max([Sample Registration].[Sample ID])+1

is there code that I can put in there that will put the focus in the list
box (called Sample ID) and simulate a mouse click in that box? You know when
you click in a list box it turns black to show it is selected, that is what I
need to happen automatically. I am sorry for the trouble, I am still learning
as I go.

"strive4peace" <"strive4peace2006 at yaho" wrote:

> Hi Halo,
>
> if what you want it the first item in the list
>
> 'list has heading row
> me.controlname = [controlname].[ItemData](1)
>
> 'list does not have heading row
> me.controlname = [controlname].[ItemData](0)
>
> do this on the LOAD event, not the Open event...
>
> Warm Regards,
> Crystal
> Microsoft Access MVP 2006
>
> *
> Have an awesome day
>
> remote programming and training
> strive4peace2006 at yahoo.com
>
> *
>
> Halocarbon wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
> > I can't assign a value to this text box because it changes every time the
> > form opens. This is a number that increases by 1 each time.
> >
> > "strive4peace" <"strive4peace2006 at yaho" wrote:
> >
> >
> >>Instead of using SendKeys, simply assign the value to the combo
> >>
> >>me.combo_controlname = value
> >>
> >>
> >>Warm Regards,
> >>Crystal
> >>Microsoft Access MVP 2006
> >>
> >> *
> >> Have an awesome day
> >>
> >> remote programming and training
> >> strive4peace2006 at yahoo.com
> >>
> >> *
> >>
> >>Halocarbon wrote:
> >>
> >>>I have a database that when my users open a form a macro runs to put the
> >>>focus in a box called "Lot Number". The form is named "ETFA". Once the focus
> >>>is in the box the macro uses the send keys function {down} to select the
> >>>number in the box. When the form first opens the focus is set correctly, but
> >>>the send keys function does not work. I can close the form and immediatly
> >>>reopen it and the send keys function works. What is wrong and can I do this
> >>>in another way other than the send keys function?
> >>

>

Reply With Quote
  #6 (permalink)  
Old 28-Jul-2006, 08:35 AM
strive4peace's Avatar strive4peace
Guest
 
Posts: n/a
   
   
Re: send Keys problem

Hi Halo,

I am a bit confused... clicking on an entry is the same as
selecting it, which is the same as assigning the value to
the control

If this is a combo:
If the lot number is not in the list, I assume you have
LimitToList=no

Do you have LimitToList=yes and are trying to add an item to
the list?

If this is a listbox... you have to pick something that is
on the list. And if it is a listbox, it is single-select?

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day

remote programming and training
strive4peace2006 at yahoo.com

*

Halocarbon wrote:
> I don't think that will work either. This lot number is not in a list the
> database does a calculation to generate this number. The lot number is not
> part of a list. Our lot numbers are generated through a query function:
> Max Of Sample ID: Max([Sample Registration].[Sample ID])+1
>
> is there code that I can put in there that will put the focus in the list
> box (called Sample ID) and simulate a mouse click in that box? You know when
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
> you click in a list box it turns black to show it is selected, that is what I
> need to happen automatically. I am sorry for the trouble, I am still learning
> as I go.
>
> "strive4peace" <"strive4peace2006 at yaho" wrote:
>
>
>>Hi Halo,
>>
>>if what you want it the first item in the list
>>
>>'list has heading row
>>me.controlname = [controlname].[ItemData](1)
>>
>>'list does not have heading row
>>me.controlname = [controlname].[ItemData](0)
>>
>>do this on the LOAD event, not the Open event...
>>
>>Warm Regards,
>>Crystal
>>Microsoft Access MVP 2006
>>
>> *
>> Have an awesome day
>>
>> remote programming and training
>> strive4peace2006 at yahoo.com
>>
>> *
>>
>>Halocarbon wrote:
>>
>>>I can't assign a value to this text box because it changes every time the
>>>form opens. This is a number that increases by 1 each time.
>>>
>>>"strive4peace" <"strive4peace2006 at yaho" wrote:
>>>
>>>
>>>
>>>>Instead of using SendKeys, simply assign the value to the combo
>>>>
>>>>me.combo_controlname = value
>>>>
>>>>
>>>>Warm Regards,
>>>>Crystal
>>>>Microsoft Access MVP 2006
>>>>
>>>> *
>>>> Have an awesome day
>>>>
>>>> remote programming and training
>>>> strive4peace2006 at yahoo.com
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
>>>>
>>>> *
>>>>
>>>>Halocarbon wrote:
>>>>
>>>>
>>>>>I have a database that when my users open a form a macro runs to put the
>>>>>focus in a box called "Lot Number". The form is named "ETFA". Once the focus
>>>>>is in the box the macro uses the send keys function {down} to select the
>>>>>number in the box. When the form first opens the focus is set correctly, but
>>>>>the send keys function does not work. I can close the form and immediatly
>>>>>reopen it and the send keys function works. What is wrong and can I do this
>>>>>in another way other than the send keys function?
>>>>

Reply With Quote
  #7 (permalink)  
Old 28-Jul-2006, 08:35 AM
Halocarbon's Avatar Halocarbon
Guest
 
Posts: n/a
   
   
Re: send Keys problem

  Donate Today!  
ok....I am sorry for the confusion. You were correct. It is a list box, and
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
it is sinfle select. The Lot number is the only item in the list box. I tried
your
> >>'list does not have heading row
> >>me.controlname = [controlname].[ItemData](0)

but i get an action failed error every time. Maybe I have entered it wrong
here is what I have.

Click a command button to Open the "ETFA Form" form.
When "ETFA" Form Opens the on load property runs a macro called "ETFA.Lock
Lot Number"
This is the macro:GoToControl: Date
SetValue:
Item: [Forms]![ETFA Form]![date]
Expression: Now()
GoToControl: HalocarbonLotNumber
Run Code: me.halocarbonlotnumber =
[halocarbonlotnumber].[ItemData](0)

Everything works except the run code line. Have I input something wrong? All
of your ideas have been greatly appreciated and I truly thank you for taking
the time to help me out!

"strive4peace" <"strive4peace2006 at yaho" wrote:

> Hi Halo,
>
> I am a bit confused... clicking on an entry is the same as
> selecting it, which is the same as assigning the value to
> the control
>
> If this is a combo:
> If the lot number is not in the list, I assume you have
> LimitToList=no
>
> Do you have LimitToList=yes and are trying to add an item to
> the list?
>
> If this is a listbox... you have to pick something that is
> on the list. And if it is a listbox, it is single-select?
>
> Warm Regards,
> Crystal
> Microsoft Access MVP 2006
>
> *
> Have an awesome day
>
> remote programming and training
> strive4peace2006 at yahoo.com
>
> *
>
> Halocarbon wrote:
> > I don't think that will work either. This lot number is not in a list the
> > database does a calculation to generate this number. The lot number is not
> > part of a list. Our lot numbers are generated through a query function:
> > Max Of Sample ID: Max([Sample Registration].[Sample ID])+1
> >
> > is there code that I can put in there that will put the focus in the list
> > box (called Sample ID) and simulate a mouse click in that box? You know when
> > you click in a list box it turns black to show it is selected, that is what I
> > need to happen automatically. I am sorry for the trouble, I am still learning
> > as I go.
> >
> > "strive4peace" <"strive4peace2006 at yaho" wrote:
> >
> >
> >>Hi Halo,
> >>
> >>if what you want it the first item in the list
> >>
> >>'list has heading row
> >>me.controlname = [controlname].[ItemData](1)
> >>
> >>'list does not have heading row
> >>me.controlname = [controlname].[ItemData](0)
> >>
> >>do this on the LOAD event, not the Open event...
> >>
> >>Warm Regards,
> >>Crystal
> >>Microsoft Access MVP 2006
> >>
> >> *
> >> Have an awesome day
> >>
> >> remote programming and training
> >> strive4peace2006 at yahoo.com
> >>
> >> *
> >>
> >>Halocarbon wrote:
> >>
> >>>I can't assign a value to this text box because it changes every time the
> >>>form opens. This is a number that increases by 1 each time.
> >>>
> >>>"strive4peace" <"strive4peace2006 at yaho" wrote:
> >>>
> >>>
> >>>
> >>>>Instead of using SendKeys, simply assign the value to the combo
> >>>>
> >>>>me.combo_controlname = value
> >>>>
> >>>>
> >>>>Warm Regards,
> >>>>Crystal
> >>>>Microsoft Access MVP 2006
> >>>>
> >>>> *
> >>>> Have an awesome day
> >>>>
> >>>> remote programming and training
> >>>> strive4peace2006 at yahoo.com
> >>>>
> >>>> *
> >>>>
> >>>>Halocarbon wrote:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13077
> >>>>
> >>>>
> >>>>>I have a database that when my users open a form a macro runs to put the
> >>>>>focus in a box called "Lot Number". The form is named "ETFA". Once the focus
> >>>>>is in the box the macro uses the send keys function {down} to select the
> >>>>>number in the box. When the form first opens the focus is set correctly, but
> >>>>>the send keys function does not work. I can close the form and immediatly
> >>>>>reopen it and the send keys function works. What is wrong and can I do this
> >>>>>in another way other than the send keys function?
> >>>>

>

Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
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

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

» Gurbani Jukebox
Listen to Gurbani while surfing SPN!
» Active Discussions
sikhism Who is "Mohan"?
Today 08:46 AM
22 Replies, 335 Views
sikhism How important is Matha...
Today 08:12 AM
59 Replies, 1,038 Views
sikhism need urgent advice.......
Today 06:46 AM
6 Replies, 81 Views
sikhism ਨਾਮਾ
Today 06:37 AM
2 Replies, 53 Views
sikhism Sikh Diamonds Video...
Today 04:23 AM
6 Replies, 116 Views
sikhism Are Creator and Creation...
Today 01:30 AM
44 Replies, 2,837 Views
sikhism Herman Hesse,...
Today 00:54 AM
13 Replies, 229 Views
sikhism On a Scale of Most...
Yesterday 21:42 PM
30 Replies, 1,277 Views
sikhism I became victim by...
Yesterday 19:50 PM
0 Replies, 44 Views
sikhism Sikh Books downloads
Yesterday 15:39 PM
2 Replies, 66 Views
sikhism Salok Sheikh Farid ji...
Yesterday 09:35 AM
0 Replies, 47 Views
sikhism In Punjab, three farmers...
Yesterday 05:36 AM
0 Replies, 49 Views
sikhism Supernatural Sikhs, what...
Yesterday 03:45 AM
19 Replies, 414 Views
sikhism Sukhmani Sahib Astpadi...
26-May-2012 22:57 PM
0 Replies, 51 Views
Do You Think You Are...
26-May-2012 09:59 AM
94 Replies, 8,258 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.2

All times are GMT +6.5. The time now is 09:19 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.79645 seconds with 30 queries