Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: sanan
  • Order by date
  1. sanan

    Setting Control values to a value like Null

    Hi RoyVidar It worked at first try. A star for you, But I know it is not enough for you. Also Thanks to Zion7, and PHV Best Regards Sanan
  2. sanan

    Forcing a User to enter Data into a control before leaving it

    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
  3. sanan

    Forcing a User to enter Data into a control before leaving it

    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...
  4. sanan

    Error Handler Mystery!

    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...
  5. sanan

    Populating a subform of some default values upon opening it.

    ...Dim myRs As New ADODB.Recordset myCn.ConnectionString = "DSN=TT2" myCn.Open myRs.Open "INSERT INTO [dbo].[AccountDetailsFinal] SELECT * FROM [dbo].[Account Details] ;", myCn, adOpenDynamic myRs.Open "Truncate table [account details] ;", myCn, adOpenDynamic DoCmd.DoMenuItem acFormBar...
  6. sanan

    Setting Control values to a value like Null

    ...Me.Controls For Each ctl In ctls If ctl.ControlType = acTextBox Or ctl.contolType = acComboBox And IsNull(ctl.Value) Then ctl.Value = "*" End If Next Set ctls = Nothing As you can see I am trying to find all the txtBoxes, and ComboBoxes Which have a Null Value, and then I...
  7. sanan

    Error handler and ADO recordset

    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...
  8. sanan

    Forcing a User to enter Data into a control before leaving it

    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
  9. sanan

    Error Handler Mystery!

    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...
  10. sanan

    Setting Control values to a value like Null

    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...
  11. sanan

    Error handler and ADO recordset

    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...
  12. sanan

    Forcing a User to enter Data into a control before leaving it

    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...
  13. sanan

    Setting Control values to a value like Null

    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...
  14. sanan

    Error Handler Mystery!

    ...Source=TT2" demoConn.ConnectionString = demoPath demoConn.Open Set sqlcmd.ActiveConnection = demoConn sqlcmd.CommandText = "Select * From OrdersOrder;" r2.CursorLocation = adUseClient r2.Open sqlcmd, , adOpenKeyset, adLockOptimistic r2.AddNew r2("OrderID") = v_OIDID...
  15. sanan

    Pause or wait for some time between Executing 2 different events

    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...
  16. sanan

    How to show the last record in an UnBound TxtBox?

    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...
  17. sanan

    How to show the last record in an UnBound TxtBox?

    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...
  18. sanan

    Pause or wait for some time between Executing 2 different events

    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...
  19. sanan

    Error Handling - What error handling?

    Hi nealvenables Are you there? I have a question on your comment. Best regards sanan
  20. sanan

    Pause or wait for some time between Executing 2 different events

    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...

Part and Inventory Search

Back
Top