?
Solved

Invalid Character Msg when using SendKeys

Posted on 2002-05-03
4
Medium Priority
?
324 Views
Last Modified: 2006-11-17
I am using a drop downlist where the user enters a birthdate.  If the birthdate is not in the list, I would like to use sendkeys "{esc}" in the not in list event.  I am getting the message "invalid character".  Could anyone let me know what I am doing wrong?  Thanks
0
Comment
Question by:Winnebago
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Expert Comment

by:James Elliott
ID: 6988784
Try using

sendkeys "{ESC}" ,true

Thanks

Jell
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6989443
Why don't you try setting focus to next control?
0
 
LVL 5

Accepted Solution

by:
gwgaw earned 150 total points
ID: 6989458
Or try this...

Private Sub MyControl_NotInList(NewData As String, Response As Integer)
Response = acDataErrDisplay
MyControl.Undo
End Sub
0
 

Author Comment

by:Winnebago
ID: 6998899
I couldn't get the other solutions to work, so I did something similar to your solution:

If MsgBox("No matches were found for the date you entered.", vbOKOnly) = vbOK Then
            Response = acDataErrContinue
        ctl.Undo
End If

Thanks for your help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question