Hi there
Thanks for all comments.
but I told you at the biginning of this thread, The LostFocus or Exit Event would work, But It creats a problem if a user decides to close the form, before entering in the control, then the Lostfocus Event's MsgBox keeps Poping up.
Best Regards
Sanan
Hi
Thanks so much for your comments.
I actually tried the BeforeUpdate of a Control, But It did not work for me.
I have the following code in BeforUpdate Event of a control: (Just a test)
Private Sub InvoiceID100_BeforeUpdate(Cancel As Integer)
If IsNull(Me.InvoiceId100) Then
Me.Undo...
Hi TomCologne, tstuetzer
Thanks so much for the comments.
I should say again that the codes work. They do exactly what they supposed to do, And that is my question, I tried the exact codes(or very similar) in another situation, They work again But only the “Checking for duplicate part of it does...
HiFrink
I am sorry for delay to respond.
Your suggestion gave me an Idea, and That is That I want to Insert Directly into the Table which is the record source of my Form. And then just refresh the Form.
I think that should work, But I came up with a very Strange Problem;
The Insert routine is...
Hi lewds, Zion7
Finally lewds’s technique worked for me.
But I have another question on it; I have another version of it, which is as follow;
Dim ctls As Controls
Dim ctl As Control
Set ctls = Me.Controls
For Each ctl In ctls
If ctl.ControlType = acTextBox Or ctl.contolType = acComboBox And...
Hi
Thank you for your Comment.
Yes, I know I can do that, But I like to use the other technique.
Some thing like;
public sub AnExample()
On Error goto ErrHandler:
' Code here that sets up an ADO Command for execution
...
...
...
' Following lines of code attempt to...
Hi
Thanks for comment.
I prefer, that I do not use the Required Field option.
But the Validation, well it is a possibility, I used it in Excel in similar situations, But I do not know how can I use it in Access.
Could you give me a hand on it?
Best Regards
Sanan
Hi TomCologne
Thanks so much for your comment.
But I should say that my “OrderID” is not a Primary Key. But it checks for Duplicate entries of “OrderID” field.
Let me ask you this question; Could you check my Latest Thread on this issue.
This is another technique of using ADO recordset; thread...
Hi lewds, Zion7
Thanks so much for your comments.
To my Surprise, I tried both techniques, But no success as of yet.
Here are the codes;
Private Sub Command156_Click()
Dim i As Integer
For i = 0 To Me.Controls.Count - 1
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox And...
Hi there
I have the following codes in on_Click event of a Button. And as you can see it’s job is to Add data to a Table in my DataBase, And It works.
But here is the little problem that I have with it, In order for it to work, all the Fields in my “tableSales” must have a value for them, other...
Hi There
What is the best way to make sure that a User enters a value in a Particular form, Before Leaving it to next Control?
I know we can use the LostFocus Event of that control, But that can create problem if the user decides to close the form before Entering any value in it, as you know the...
Hi there
I have a form with bunch of TxtBoxes, comboBoxes, Buttons, and a subform, I would like to set the value of all the TxtBoxes and comboBoxes in my Form (Not the subform) to Null.
I know one way to do it is by calling each one of them like;
Me.InvoiceID100.Value = Null
But since there are...
Hi there
I am a little confused on Error Handler in ADO recordset.
Following codes Work. (so do not be intimitate by the size of it)
Basically How does the Error handler work? I have some Idea about the concept of it, But I am not quite sure “for example, In a situation that we are trying to...
Hi RoyVidar
Thanks for comment.
It is working just fine. Thanks again, but I have a question on this issue, Let’s say that we have 2 Events or that are related to each other One works based on the result of the other Events. Now; is it possible to use this delay or Pause to have one finishes...
Hi Zion7
Thanks so much for your Comment.
I tried the following codes;
Private Sub Command156_Click()
Me.Undo
Forms!Sales![AccountDetails].Form.Undo
End Sub
But no success.
Again as I said, It works fine while I am in the Parent Form “sales”, (Off Course The Me.Undo Part of it) As I am...
Hi GingerR, Zion7
Thanks again for your excellent help.
It is working just fine.
But my Problem still remains. Actually the actual problem, which leads to this Thread is quite different.
In Access FE and SQL BE, I have a form called “Sales”, and in this form there is another SubForm Called...
Hi GingerR, Zion7, PHV
Thank You so much for all your helps.
GingerR, Actually I saw this Thread, just Yesterday, But even then I couldn’t quite understand where to put this code;
“The sapiSleep coding should be put at the top of the class module - above all other subroutines and functions. The...
Hi There
For Example, I would like to press 2 Buttons by pressing 1 Button, or in UnLoad Events of a form.
Lets say that we have;
Command10_click Button and
Command20_Click button
I would like that both of them to be pressed in an Unload event of my form, But here is the challenge that there...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.