Search results

  1. L

    Use variable from a "FormModule" in a "StandardModule"

    Waw, what a help!! I ow you ;)! I'll give it a try asap! Thanks!!!!
  2. L

    Regular expressions: how to find several matches?

    Hi, if I have a value of a record, example: "LU_ATTRIB:LUTYPE:A1_VALUES" My goal is, using regular expressions, to come to 3 variables comming from that record, namely: LU_ATTRIB, LUTPE and A1_VALUES in the variables field1, field2, field3. I tried the following code: Function...
  3. L

    Use variable from a "FormModule" in a "StandardModule"

    I don't really understand. You wrote: "If the routine must exist in a Standard module so that other objects can use it, the best way to communicate data to that routine is pass in a parameter..." Sub AddSecondLC(Language2 as string) If Language2 = "Dutch" Then ... End If End sub In my...
  4. L

    Use variable from a "FormModule" in a "StandardModule"

    I'll try to put it tomorrow morning here.. if you have still time then.. Because I've got to go very quick now. Thanks!
  5. L

    Use variable from a "FormModule" in a "StandardModule"

    Hi, I changed the location of public sub declaration to my standard module, but still he doesn't find the values inserted in the form via the form-module? Any idea what could be the mistake? When I use an "addwatch" when running the code, in my standardcode, when coming on the value...
  6. L

    Use variable from a "FormModule" in a "StandardModule"

    Wel, in my form, I put an event on the textbox called "SECONDLC". Then it automattically creates in the module "Form_Main": Private Sub SECONDLC_AfterUpdate() End sub IN which afterwoods I added the variable "secondlanguage" and the procedure "AddSecondLC" . So what exactly do you mean by...
  7. L

    Use variable from a "FormModule" in a "StandardModule"

    Hi, I created a form called "MAIN". In a textbox called "SECONDLC", a user needs to insert a word. The aim is that I can use his/her inserted word in my standard code (by using After Update event). So in my code under "Microsoft Office Access Class Objects" under "Form_MAIN", I put the code...
  8. L

    Check box using data coming from user input

    Thanks! Using your code I simplified it (importing the tables right away in the form). My final code, which works :): "Main" = name of my form "CheckRailways" = Name of the checkbox Public Sub import_Click() If Forms(Main).CheckRailways = True Then PathSource = PathSource_RAILWAYS...
  9. L

    How to define wheter a table is part of a database via code

    IT WORKS!!!!!!!!!!!!!! Actually I tried the folowing: In my code of the function: Function tblexisting(SName As String) As Boolean tblexists = False On Error Resume Next tblexists = CBool(Not CurrentDb.TableDefs(SName) Is Nothing) On Error GoTo 0 End Function And in the general actions...
  10. L

    How to define wheter a table is part of a database via code

    I tried that already but it gives the same error: "Compile error:argument not optional" Actually, the function tblexist, it does returns a true or false? no? And it does returns false when an error is "jumped over"? I tried the following but that doesn't work (I tried to enter a variable...
  11. L

    How to define wheter a table is part of a database via code

    HI, that works! The code is not bugging on that anymore, but: My aim was the folowing: A user imports some tables using a form using check boxes. Then in my code, I'like to see which ones are imported (my question on this forum). Because, once I know which tables are imported, I can perform...
  12. L

    How to define wheter a table is part of a database via code

    Hi, Thanks for the code, I copied it litterarly, but it also still gives the same mistake: on the folowing line tblexists = CBool(Not db.TableDefs(SName) Is Nothing) The error is:"Item is not found in the collection" I really don't understand, as it is preceded with "On Error resume next". I...
  13. L

    How to define wheter a table is part of a database via code

    Hi, Im trying two use the errorhandling method but in some way it still gives the same error: "Item not found in this collection" on the line tblexists = CBool(Not CurrentDb.TableDefs(layername) Is Nothing). My complete code: Function present(layer As String) On Error GoTo fail tblexists =...
  14. L

    How to define wheter a table is part of a database via code

    Thanks for your help but somehow it doesn't works: If have several table in my database. If the table is present, the tblexists indeed returns the value true, but if the table is not part of the database, I get an error: "Item not found in this collection" on the folowing line: tblexists =...
  15. L

    How to define wheter a table is part of a database via code

    Hi, Is there some way to determine wheter or not a table is present in a database or not? For example, I have the table Roads in my database. Sometimes the user imports this table, sometimes not. When it it imported some actions should be run on it. But how can I check via code wheter or not...
  16. L

    Check box using data coming from user input

    I'm don't understand exactly, my problem is the following : My form looks like this: *some checkboxes *at the end a command button named "GO" The aim of my code: If the user has vinked a checkbox (example, a checkbox named "Checkadmin"), then, when he clicks on the command button beneath, the...
  17. L

    Check box using data coming from user input

    Hi, I made a form with several checkboxes. The aim is that a user can vink/devink the checkbox and that, in case a checkbox is vinked, I can see that using code. I was trying by using the 'Onclick' event but I can't get the possibility to register in my code wheter or not the checkbox is...
  18. L

    Size of a text field - how to block it?

    Thanks!! With the brackets it works! Leen
  19. L

    Size of a text field - how to block it?

    HI, When I look to the help about InputMask, this property applies only on combobox and textbox. However, I want the restriction that when entering data in a TABLE, the fieldlenght entered should be EXACTLY 3 (Not maximum 3). So I think it should be one of the properties of a field, but I don't...
  20. L

    Size of a text field - how to block it?

    Hi, I have created a table using vba. To create the fields I used the folowing statement: .Fields.Append .CreateField("SNAM1LC", dbText, 3) In this case the fieldlength is maximum 3. However, I'd like to force in some way that that field can only have inputs of exactly 3 characters. So that...
Back
Top Bottom