A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

possible to simulate pressing of key with VBA code?



 
 
Thread Tools Display Modes
  #1  
Old August 13th, 2005, 09:44 AM
A.J.M. van Rijthoven
external usenet poster
 
Posts: n/a
Default possible to simulate pressing of key with VBA code?

Is this possible??
When a field is double-clicked, i want the field (combobox) to be
updated first and then start a procedure.
I have a combobox, 2 collumns, ID and name.
I want this for the following reason: when the combobox has already
data and i erase the name with the delete key, i want the combobox
data cleared (name is already cleared, id has to be cleared) when i
double click on the box. I tried it with setfocus on another field but
it doesn't work.

Toine
  #2  
Old August 13th, 2005, 12:25 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

To clear the selected record in a combobox, set it to Null:

Me.cboNames = Null

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"A.J.M. van Rijthoven" wrote in message
...
Is this possible??
When a field is double-clicked, i want the field (combobox) to be
updated first and then start a procedure.
I have a combobox, 2 collumns, ID and name.
I want this for the following reason: when the combobox has already
data and i erase the name with the delete key, i want the combobox
data cleared (name is already cleared, id has to be cleared) when i
double click on the box. I tried it with setfocus on another field but
it doesn't work.

Toine



  #3  
Old August 13th, 2005, 02:52 PM
A.J.M. van Rijthoven
external usenet poster
 
Posts: n/a
Default

The problem is that i want to clear the record only when the data in
the selected records is cleared with the delete or backspace key. and
when directly after that someone soubleclicks in the combobox. The
problem is that the combobox data is not updated yet because the
record still has the focus...
When the selected record contains data when it is double clicked, a
screen opens to alter the data.
When the text in the selected record is cleared with the delete or
backspace key, a screen opens with the possibility to add a new record
to the combobox.

On Sat, 13 Aug 2005 07:25:38 -0400, "Douglas J. Steele"
wrote:

To clear the selected record in a combobox, set it to Null:

Me.cboNames = Null


 




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with VB on screensaver Nigel General Discussion 0 June 6th, 2005 11:37 AM
passing arrays to VB via EXCEL4 API cell division General Discussion 0 November 5th, 2004 03:53 AM
My Access front-end bloats! Rauken General Discussion 10 September 28th, 2004 05:06 AM
VB Help Needed - PPT Error when loading VB code Too Much Work To Lose Powerpoint 1 September 10th, 2004 08:56 PM
VB for Apps Confusion cincode5 General Discussion 2 June 17th, 2004 04:06 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.