You've not really explained what you're tyring to do, but the first problem I
see is that you have TWO Case Else's!!! Generally speaking, it looks like
everything from "Case 5" on down needs to be in "Case 5." You need to put
logic there to check to see if the record is found in the first table and if
not, check to see if it's in the second table, and if not there throw up
your message box.
Viper wrote:
>Select Case Len(Me.txtUserInput)
> Case 5
> Set rstedit = db.OpenRecordset("SELECT * FROM
>tblAlternateDealerInfo WHERE [PDN] = " & searchcrit)
> Case Else
> Set rstedit = db.OpenRecordset("SELECT * FROM tblDealerInfo
>WHERE [PDN] = " & searchcrit)
> Case Else
> MsgBox "Please enter a 5 digit primary dealer number."
> Me.txtUserInput = ""
>End Select
>
>There is my code... I want to open one tbl and if the record is not
>there open the second tbl and if it is not there i want it to put that
>message box.
>
> How can i do this?
>
>Thanks
--
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
Message posted via
http://www.accessmonster.com