
28-Jul-2006, 08:34 AM
|  | Guest | | | | | | | | | | send Keys problem 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.htmlReference:: 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! | 
28-Jul-2006, 08:34 AM
|  | Guest | | | | | | | | | | 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? | 
28-Jul-2006, 08:34 AM
|  | Guest | | | | | | | | | | 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?
> | 
28-Jul-2006, 08:34 AM
|  | Guest | | | | | | | | | | 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?
>> | 
28-Jul-2006, 08:34 AM
|  | Guest | | | | | | | | | | 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?
> >>
> | 
28-Jul-2006, 08:35 AM
|  | Guest | | | | | | | | | | 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?
>>>> | 
28-Jul-2006, 08:35 AM
|  | Guest | | | | | | | | | | Re: send Keys problem 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?
> >>>>
> | 
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! | (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 | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Gurbani Jukebox | Listen to Gurbani while surfing SPN! | » Active Discussions | | | | | | | ਨਾਮਾ Today 06:37 AM 2 Replies, 53 Views | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |