if not found

  • Thread starter Thread starter Scubaman
  • Start date Start date
S

Scubaman

Good morning,
in my openings form I have a button search clients. It works fin, when I
give in the name of an existing client. When I misspell the name a blank
screen comes up.
Is it possible when the name is not found to have a small pop up window,
to show up saying Sorry client not found. And that after a few seconds I
return to the openings form?

Is some one willing/able to help me

Thanks in advance
Bert
 
Please post back with the code you use to do the search. This is not a hard
thing to do.
 
Klatuu schreef:
Please post back with the code you use to do the search. This is not a hard
thing to do.


Thank you for the reply
Here is the code I use


Private Sub Klant_zoeken_Click()
On Error GoTo Err_Klant_zoeken_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Zoeken op achternaam"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Klant_zoeken_Click:
Exit Sub

Err_Klant_zoeken_Click:
MsgBox Err.Description
Resume Exit_Klant_zoeken_Click

End Sub
 
This is a little different that what I thought might be the issue. What I
really need to see is how and where you are populating the varialbe
stLinkCriteria
 
In the form I have a button. "Klanten zoeken" this button directs to a
form called "zoeken op achternaam". When this form opens I use a query.
Hope this is enough. Could I otherwise zip the database and send it to you?

Thanks again,
Bert


Klatuu schreef:
 
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it needs to be
validated to be sure it is in the table before you proceed. After the client
name is entered, use a DLookup to be sure it is there. Use the before update
event of the text box you enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '" &
Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If
 
Thank you for the help, will try to use your solution. I hope I won't
have to border you again.

THANKS
Bert

Klatuu schreef:
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it needs to be
validated to be sure it is in the table before you proceed. After the client
name is entered, use a DLookup to be sure it is there. Use the before update
event of the text box you enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '" &
Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If

Scubaman said:
In the form I have a button. "Klanten zoeken" this button directs to a
form called "zoeken op achternaam". When this form opens I use a query.
Hope this is enough. Could I otherwise zip the database and send it to you?

Thanks again,
Bert


Klatuu schreef:
 
No bother at all.

Scubaman said:
Thank you for the help, will try to use your solution. I hope I won't
have to border you again.

THANKS
Bert

Klatuu schreef:
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it needs to be
validated to be sure it is in the table before you proceed. After the client
name is entered, use a DLookup to be sure it is there. Use the before update
event of the text box you enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '" &
Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If

Scubaman said:
In the form I have a button. "Klanten zoeken" this button directs to a
form called "zoeken op achternaam". When this form opens I use a query.
Hope this is enough. Could I otherwise zip the database and send it to you?

Thanks again,
Bert


Klatuu schreef:
This is a little different that what I thought might be the issue. What I
really need to see is how and where you are populating the varialbe
stLinkCriteria

:

Klatuu schreef:
Please post back with the code you use to do the search. This is not a hard
thing to do.

:

Good morning,
in my openings form I have a button search clients. It works fin, when I
give in the name of an existing client. When I misspell the name a blank
screen comes up.
Is it possible when the name is not found to have a small pop up window,
to show up saying Sorry client not found. And that after a few seconds I
return to the openings form?

Is some one willing/able to help me

Thanks in advance
Bert

Thank you for the reply
Here is the code I use


Private Sub Klant_zoeken_Click()
On Error GoTo Err_Klant_zoeken_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Zoeken op achternaam"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Klant_zoeken_Click:
Exit Sub

Err_Klant_zoeken_Click:
MsgBox Err.Description
Resume Exit_Klant_zoeken_Click

End Sub
 
Hello again,

I tried to use your suggestion and put it in the form and "before
update"But I don't see my msg box, with the question Whom are you
looking for. It directly goes to the first record.

Please help me again
Bert

Klatuu schreef:
No bother at all.

Scubaman said:
Thank you for the help, will try to use your solution. I hope I won't
have to border you again.

THANKS
Bert

Klatuu schreef:
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it needs to be
validated to be sure it is in the table before you proceed. After the client
name is entered, use a DLookup to be sure it is there. Use the before update
event of the text box you enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '" &
Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If

:

In the form I have a button. "Klanten zoeken" this button directs to a
form called "zoeken op achternaam". When this form opens I use a query.
Hope this is enough. Could I otherwise zip the database and send it to you?

Thanks again,
Bert


Klatuu schreef:
This is a little different that what I thought might be the issue. What I
really need to see is how and where you are populating the varialbe
stLinkCriteria

:

Klatuu schreef:
Please post back with the code you use to do the search. This is not a hard
thing to do.

:

Good morning,
in my openings form I have a button search clients. It works fin, when I
give in the name of an existing client. When I misspell the name a blank
screen comes up.
Is it possible when the name is not found to have a small pop up window,
to show up saying Sorry client not found. And that after a few seconds I
return to the openings form?

Is some one willing/able to help me

Thanks in advance
Bert

Thank you for the reply
Here is the code I use


Private Sub Klant_zoeken_Click()
On Error GoTo Err_Klant_zoeken_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Zoeken op achternaam"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Klant_zoeken_Click:
Exit Sub

Err_Klant_zoeken_Click:
MsgBox Err.Description
Resume Exit_Klant_zoeken_Click

End Sub
 
Did you put it in the Form's Before update? It should go in the Before
Update of the text box where you enter the Client ID

Scubaman said:
Hello again,

I tried to use your suggestion and put it in the form and "before
update"But I don't see my msg box, with the question Whom are you
looking for. It directly goes to the first record.

Please help me again
Bert

Klatuu schreef:
No bother at all.

Scubaman said:
Thank you for the help, will try to use your solution. I hope I won't
have to border you again.

THANKS
Bert

Klatuu schreef:
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it needs to be
validated to be sure it is in the table before you proceed. After the client
name is entered, use a DLookup to be sure it is there. Use the before update
event of the text box you enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '" &
Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If

:

In the form I have a button. "Klanten zoeken" this button directs to a
form called "zoeken op achternaam". When this form opens I use a query.
Hope this is enough. Could I otherwise zip the database and send it to you?

Thanks again,
Bert


Klatuu schreef:
This is a little different that what I thought might be the issue. What I
really need to see is how and where you are populating the varialbe
stLinkCriteria

:

Klatuu schreef:
Please post back with the code you use to do the search. This is not a hard
thing to do.

:

Good morning,
in my openings form I have a button search clients. It works fin, when I
give in the name of an existing client. When I misspell the name a blank
screen comes up.
Is it possible when the name is not found to have a small pop up window,
to show up saying Sorry client not found. And that after a few seconds I
return to the openings form?

Is some one willing/able to help me

Thanks in advance
Bert

Thank you for the reply
Here is the code I use


Private Sub Klant_zoeken_Click()
On Error GoTo Err_Klant_zoeken_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Zoeken op achternaam"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Klant_zoeken_Click:
Exit Sub

Err_Klant_zoeken_Click:
MsgBox Err.Description
Resume Exit_Klant_zoeken_Click

End Sub
 
Good evening,

Indeed I put in the form. Shall try again.

Thanks for your patience
Bert

Klatuu schreef:
Did you put it in the Form's Before update? It should go in the Before
Update of the text box where you enter the Client ID

Scubaman said:
Hello again,

I tried to use your suggestion and put it in the form and "before
update"But I don't see my msg box, with the question Whom are you
looking for. It directly goes to the first record.

Please help me again
Bert

Klatuu schreef:
No bother at all.

:

Thank you for the help, will try to use your solution. I hope I won't
have to border you again.

THANKS
Bert

Klatuu schreef:
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it needs to be
validated to be sure it is in the table before you proceed. After the client
name is entered, use a DLookup to be sure it is there. Use the before update
event of the text box you enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '" &
Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If

:

In the form I have a button. "Klanten zoeken" this button directs to a
form called "zoeken op achternaam". When this form opens I use a query.
Hope this is enough. Could I otherwise zip the database and send it to you?

Thanks again,
Bert


Klatuu schreef:
This is a little different that what I thought might be the issue. What I
really need to see is how and where you are populating the varialbe
stLinkCriteria

:

Klatuu schreef:
Please post back with the code you use to do the search. This is not a hard
thing to do.

:

Good morning,
in my openings form I have a button search clients. It works fin, when I
give in the name of an existing client. When I misspell the name a blank
screen comes up.
Is it possible when the name is not found to have a small pop up window,
to show up saying Sorry client not found. And that after a few seconds I
return to the openings form?

Is some one willing/able to help me

Thanks in advance
Bert

Thank you for the reply
Here is the code I use


Private Sub Klant_zoeken_Click()
On Error GoTo Err_Klant_zoeken_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Zoeken op achternaam"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Klant_zoeken_Click:
Exit Sub

Err_Klant_zoeken_Click:
MsgBox Err.Description
Resume Exit_Klant_zoeken_Click

End Sub
 
Tried it, but the box is from a query, so can't put in a code there, or
can I?
Bert

Scubaman schreef:
Good evening,

Indeed I put in the form. Shall try again.

Thanks for your patience
Bert

Klatuu schreef:
Did you put it in the Form's Before update? It should go in the
Before Update of the text box where you enter the Client ID

Scubaman said:
Hello again,

I tried to use your suggestion and put it in the form and "before
update"But I don't see my msg box, with the question Whom are you
looking for. It directly goes to the first record.

Please help me again
Bert

Klatuu schreef:
No bother at all.

:

Thank you for the help, will try to use your solution. I hope I
won't have to border you again.

THANKS
Bert

Klatuu schreef:
No, that wont be necessary. Our firewall blocks zip files anyway.

I think the basic problem is when you enter a client name, it
needs to be validated to be sure it is in the table before you
proceed. After the client name is entered, use a DLookup to be
sure it is there. Use the before update event of the text box you
enter the client id in to look for it.

If IsNull(DLookup("[ClientID]", "ClientTable", "[ClientID = '"
& Me.txtClient & "'")) Then
MsgBox "Client ID Not Found"
Cancel = True
End If

:

In the form I have a button. "Klanten zoeken" this button directs
to a form called "zoeken op achternaam". When this form opens I
use a query. Hope this is enough. Could I otherwise zip the
database and send it to you?

Thanks again,
Bert


Klatuu schreef:
This is a little different that what I thought might be the
issue. What I really need to see is how and where you are
populating the varialbe stLinkCriteria

:

Klatuu schreef:
Please post back with the code you use to do the search. This
is not a hard thing to do.

:

Good morning,
in my openings form I have a button search clients. It works
fin, when I give in the name of an existing client. When I
misspell the name a blank screen comes up.
Is it possible when the name is not found to have a small pop
up window, to show up saying Sorry client not found. And that
after a few seconds I return to the openings form?

Is some one willing/able to help me

Thanks in advance
Bert

Thank you for the reply
Here is the code I use


Private Sub Klant_zoeken_Click()
On Error GoTo Err_Klant_zoeken_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Zoeken op achternaam"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Klant_zoeken_Click:
Exit Sub

Err_Klant_zoeken_Click:
MsgBox Err.Description
Resume Exit_Klant_zoeken_Click

End Sub
 
Back
Top