Search results

  1. PearlGI

    Reusing a calculated field in another field

    Thanks for that idea. It was obvious if I thought about it! My eyes were clouded by looking for a more complex answer!! However, (as I'm always looking to expand my knowledge) does anyone know if it's possible to solve the original problem in just 1 query?
  2. PearlGI

    Hidden attributes

    Try this: If dbRecherche.TableDefs(i).Attributes <> 0 Then If the attribute is zero the file is visible, therefore by default if it's not zero it must be hidden!! But I'm sure someone will point out the flaw in this logic.
  3. PearlGI

    Reusing a calculated field in another field

    Here's the situation: I have a query that has 2 calculated fields, I then need a 3rd field which is based on a calculation of the first 2, eg. Field3 wants to equal Field1 / Field2 This works fine until I specify a criteria on Field3. When I run the query with a criteria, Access prompts me...
  4. PearlGI

    Loop

    The following loop would work: For x = 1 To 1200 IF x MOD 12 = 0 THEN {Do Something Different} EndIF Next x The MOD function returns the remainder of x divided by 12, therefore if x is divisible by 12 the remainder equals zero. HTH
  5. PearlGI

    Control Value Refresh

    For info, it's in my Access97. Library = VBA Class = Interaction Search in the object browser.
  6. PearlGI

    Control Value Refresh

    I've used the DoEvent function in the past to do this. Place it straight after the line that updates the form. This then yields execution so that the operating system can process other events. There may be other ways to do this though!
  7. PearlGI

    Database size

    DBsize should be defined as LONG, not BYTE.
  8. PearlGI

    Database size

    Use the FileLen function. HTH
  9. PearlGI

    InputBox Password format....

    Not sure if this is going to help in this scenario, but I had a similar problem with being able to identify the form Event that was calling a function. See this link: http://www.access-programmers.co.uk/ubb/Forum7/HTML/002082.html
  10. PearlGI

    InputBox Password format....

    Sorry, missed that InputBox comment. Do not know anyway to do this with an InputBox. Is there any reason why you can't use VBA to launch a form rather than use the InputBox for the password? [This message has been edited by PearlGI (edited 12-04-2001).]
  11. PearlGI

    ? Count specific character in FIELD

    You need to setup a progressive loop. 1. Store the field in a String 2. Use InStr to find the first occurance of "/" and increase a counter by 1 and store the position returned in, say intPos. 3. Truncate the string using something like myString=MID(myString,intPos+1) 4. Search new string...
  12. PearlGI

    dynamic form data

    Get the AfterUpdate event of field1 to set the RowSource property of field2 based on the value contained in field1. The VBA to change the RowSource of field2 would look something like: Me.field2.RowSource = "SELECT [field2Data] FROM [field2Table] WHERE [something] = " & me!field1 This should...
  13. PearlGI

    InputBox Password format....

    Set the TextBox InputMask value to Password. Then anything typed will appear as ****. HTH
  14. PearlGI

    CreateObject

    This code will do the basics of what you want: dim objExcel As Object Set objExcel = CreateObject("Excel.Application") Columns("C:C").Insert Shift:=xlToRight objExcel.Quit Set objExcel = Nothing HTH
  15. PearlGI

    Count files in a dir

    Hi, I use the following, which calls the Excel function FileSearch (ensure Microsoft Excel Object Library is referenced under Tools, References) With Application.FileSearch .Lookin = "c:\MyDir" .SearchSubFolders = False (or True depending) .Filename = "*.*" (or any file pattern you...
  16. PearlGI

    vbCrLf in textbox

    I'm slightly confused!! The method described will insert a carriage return in the textbox, which has the same effect as vbCrLf has on a variable string. If however, you actually want the text 'vbCrLf' to appear in the textbox, then the way to achieve this is to use the [On Key Press] event...
  17. PearlGI

    vbCrLf in textbox

    Change the textbox property [Enter Key Behavior] from {Default} to {New Line in Field}. When a user presses {ENTER}, a new line will be started in the textbox rather than moving onto the next field. The user will now have to use {TAB} to complete the entry. HTH
  18. PearlGI

    inserting a CR in a textbox

    If your still looking, this link may help: http://www.access-programmers.co.uk/ubb/Forum4/HTML/004705.html HTH
  19. PearlGI

    FIND not applicable in VBA

    You need to use the InStr function rather than Find. Try this line: zzz=Left(zyy, Instr(1, zyy, ".") - 1) That should sort you out. HTH
  20. PearlGI

    Message Boxes

    Because the textbox is bound to a table, use Me.Requery before your first If statement. This should refresh the data in the table underlying the form and negate the need to exit the current record.
Back
Top Bottom