Search results

  1. L

    Run a function without a different argument value

    Hi, How exactly do you run a function with a different argument value? For now, I run a form and via this way I give the variable "intputlayers" a value, used in the following function: Function QChecks(inputlayers As String) However, I want to run this form standalone, without form. So...
  2. L

    Length of an array after split?

    Hi, How do you know how many substrings an array contains after using split? My code needs the number of elements as it has to peform some actions on that: Function findexpression(inputvalue As String, inputexpression As String) As Boolean 'In case the rules is a regular expression, the check...
  3. L

    Run a sub procedure

    Hi, I made a sub procedure where an input is requiered, example: sub QChecks(layername) I wanted to automate a proces, so the inputstring for the parameter layername is entered by a form. To run the complete tool, I made a function in VB: Function Qualitychecks() QChecks(input) So the...
  4. L

    Returning several variables from function

    Hi! I'm using a separate procedure in which I enter 1 variable. This procedure should return 3 strings. I know how a function procedure can return 1 argument, but I can't find how to let it return several arguments. I tried via an array "parts()" but this doesn't work: My code: Function...
  5. L

    simple question:using the output of a function into a sub procedure

    Hi, I think this is a very stupid question, but for one reason it doesn't work. I have in my code: Public reftablename As String Public reffield As String Public field As String Then I created a function: Function regexpparts(inputfield As String) 'As String 'find all parts of the inputfield...
  6. L

    Regular expression: I don't find right pattern

    Hi, I have a problem using regular expressions, in which I don't find the correct pattern to return the right values. I have a table, in which in the records, names are stored. For example: Street Alex Victorian Runway etc. The goal is to check whether the user has filled in the names using a...
  7. L

    How to display Decimal places using VBA

    Hi, I'd like to create a table using VBA where one of the fields is a number datataype, the fieldsize property is double. .Fields.Append .CreateField("LENGTH", dbDouble) However, I'd like tthat that, when values are inserted in this tablefield, 7 decimal places are displayed. I know you can...
  8. L

    A little question: change color of text in msgbox?

    Hi, I have a msgbox and I'd like to have the colour of the text in a different color: If tblexists = False Then MsgBox ("Table RAILWAYS is not present in the database") Else MsgBox ("OK: Table RAILWAYS is present in the database") End If In the first case, I...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. L

    Using data inserted in a textbox of a form in VBA

    Hi! I made a form in which the user of the form needs to enter the name of a table and its datasource. Once he has written this, I want to run a macro that inserts that table into Access For that macro their is no problem: PathSource = "D:\Leen" NameInput = "railway_line_pune.dbf"...
  15. L

    Adding an autonumber field automatically

    Hi, Can somebody help... I'm trying to put via an automatic way a field to a table that autonumbers. When I use a select-query: ALTER TABLE tablename ADD COLUMN Id Autonumber, Access doesn't recognizes the type "Autonumber". Even in VBA when I use the .createfield method, I can't set the...
  16. L

    Regular expressions

    Hi, I'm working with regular expressions in VBScript and I'd like to implement them in VBA in a module. However, in the helpfile from VBScript I found: VBScript Features not in Visual Basic for Applications : among others the function "RegExp" (the use of Regular expressions). However, on the...
  17. L

    Replace all null-values in a table to zero-values at once?

    Hi, I have a table with several (many) fields and for each field I have some empty values (cells). For now, I made an update-query for each field, for example: IIf(IsNull([Man1Type]),"0",[Man1Type]). This works, however, as there are many fields I was searching for an automatic code (using...
  18. L

    Autonumber automaticcaly?

    My goal is to automate a process via Macros, without that the user of the database has to touch the design view etc. I have one table met 1 field = Road_id, but know, I'd like to add a second field (ex. auto_id) and have this one in autonumber, for example: road_id & auto_id 5 &...
  19. L

    Beginner -How to create a table with VBA?

    I'd like to create a table using the folowing subprocedure: ----- Sub CreateTable() Dim dbs As Database, tbl As TableDef, fld As Field Set dbs = CurrentDb Set tbl = dbs.CreateTableDef("Test") Set fld = tbl.CreateField("test1", dbText) tbl.Fields.Append fld dbs.TableDefs.Append tbl...
Back
Top Bottom