Search results

  1. G

    Check my code please

    Would this code work? The part I'm not sure about is "rst(Field.Name) = control.Value " '************************************************* Set rst = dbs.OpenRecordset("tblRepeats", dbOpenDynaset) Criteria = "Project= '" & Me.txtProject & "'" rst.FindFirst Criteria '**** do if no Project was...
  2. G

    Please Help with code used on user/pass form

    Hi eforce, Check this thread http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=27629&highlight=user+name+and+password Also, there are lots of postings regarding your question. Just do a little search and read away. Hope it helps, George
  3. G

    Reference the the label associated to a Text Box

    Got it! :D Thanks Rich
  4. G

    Reference the the label associated to a Text Box

    God I'm such a newbie! :( Hello guys, I want to know if it is possible to reference the the label associated to a Text Box. Here is my code: For Each control In Me.controls If control.ControlType = acTextBox Then If IsNull(control.Value) Then MsgBox( "" & control.controlname &...
  5. G

    Looking for words in a string

    Thanks Mile-O-Phile, that works. Now how do I build a Select Case using 'Instr(1, YourMessage, "demo")' ? I have tried but I keep getting type mismatch errors. Here is the code that I'm using: Dim Brand as String Brand = Me.cmbBrand Select Case Me.cmbBrand Case Me.cmbBrand Is InStr(1...
  6. G

    Looking for words in a string

    OK, here we go again. How do I make my code look for a word within a string a then do something. For example, I have the string "This is a test for 6th grade." and "This is a demo for 7th grade." I want the code to look for the words 'test' and 'demo' and then run the appropriate code...
  7. G

    .Value vs .OldValue

    Reason I was asking is that I was using OldValue in my code but noticed that for some reason calculations were not right and there's where it came to me that it could be the property I was using. Thanks for making it clear. George
  8. G

    .Value vs .OldValue

    So, if I want to get the corrent value from a text box the best property to use is Value instead of OldValue? How would OldValue, in this case, affect the outcome of my calculations?
  9. G

    .Value vs .OldValue

    I was wondering what is the difference between .VALUE and .OLDVALUE. Can you guys explain in English?
  10. G

    Number comparison from a list

    Thanks Harry, my problem was that I had my variable = 0 (that was part of the problem). Thank you, code is working just fine now. Thank you all for your replies. George
  11. G

    Number comparison from a list

    Hi all, WayneRyan, regarding your post, I realize what you're saying, but I do need that line of code to hold the value I am testing against the new value. The only thing is that it is in the wrong place. If you take a look at the code for Private Sub cmdSmallest_Click(), that line of code is...
  12. G

    Number comparison from a list

    Hi raskew, Like I said before, the code does work most of the time. I just haven't figure out what are the conditions when it doesn't. I modified the code from the code below which does work beautifully: **************************** Private Sub cmdSmallest_Click() Dim iSmallest As Integer...
  13. G

    Number comparison from a list

    Hi all, The code below works some times but not others. Is there anything wrong with the sintax? For Each control In subfrmRepeats.Controls If control.ControlType = acTextBox Then Num = control.OldValue Smallest = Num If Num < Smallest Then Smallest = Num...
  14. G

    refer to controls on tabbed form

    Hi jrmywvr, I'm not that clear on what exactly your problem is but hope this helps: 1. To enable the Tab control in my database I used the following line of code: Me.TabCtlReadings.Enabled = True This, by the way, enables all the controls in the Tab control ( I have them disabled). 2. Now...
  15. G

    Reduce code

    Hi Patrick, I was trying something similar except that I missed the ".controlName" part. Code is working like a charm... Thanks a lot! :D
  16. G

    Reduce code

    Hi Patrick, Your code works nicely, but I run into a problem that I don't know how to solve. All the controls in the subform are text boxes so I don't need that line of code you talk about. What I do need though is a line of code that will exclude a particular text box out of the 31. What...
  17. G

    Reduce code

    Hi all, I was wondering how to reduce the following code: '*********************** 'Initialize variables N = 0 'Number of rolls A = 0 'Sum of All entries 'Add fields If Not IsNull([subfrmRepeats].[Form]![Roll1]) And [subfrmRepeats].[Form]![Roll1] <> 0 Then A = A +...
  18. G

    Math Calculations

    DJN, I have taken the unbound text approach, but i keep getting the error: "The expression you entered has a function containing the wrong number of arguments." I have follow your syntax but something else seems to be not working. Any other pointers? Thanks,
  19. G

    Math Calculations

    Variable not defined "FieldValues". I need more help using this function. Thanks.
  20. G

    Math Calculations

    Thanks, I'll try it today. :D
Back
Top Bottom