Search results

  1. crosmill

    User write to hard code

    Is there a way I can get the user to input a variable that will then write to hard code so that it doesn't change the next time the app is opened. But can be changed by running that code again.
  2. crosmill

    Break out of the code

    Works Great Cheers :)
  3. crosmill

    Break out of the code

    Is there a command I can use to stop/break out of the code at a certain point. Cheers
  4. crosmill

    Array data types

    This is the code I finished up with. Private Sub Command7_Click() Dim dbs As Database Dim rst As Recordset Dim RanValue As Integer Dim noLoop As Integer Dim nolooped As Integer Dim AccNoOfRecords As Integer Dim RanNum As Integer Dim ln As Integer Dim sqlStr...
  5. crosmill

    Array data types

    Great one cheers mate
  6. crosmill

    Message to appear until query has run.

    You need to have the macro order like this Open Form Repaint Form Run Query Close Form Give that a go!
  7. crosmill

    Message to appear until query has run.

    Which form is locking it? is it the "running query" form or the form you click to run the macro? if it's the latter use the macro to close that form and then reopen it again at the end.
  8. crosmill

    Wildcard???

    Got you!! You can't have a wild card in the middle of a string, the wild card is looking for any characters after the first part, so it will ignore the .dat. # will find any single number, so try Importfile = "Standard_name_part" & "#####" & ".dat" hth
  9. crosmill

    Wildcard???

    Ok to create a random number use this Dim MyValue as Integer Randomize MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6. Istead of using Importfile = "Standard_name_part" & "*" & ".dat" use Importfile = "Standard_name_part" & MyValue & ".dat" Search the help file on Rnd...
  10. crosmill

    Array's <Subscript out of Range>

    Closed http://www.access-programmers.co.uk/forums/showthread.php?s=&postid=97010#post97010
  11. crosmill

    Array data types

    I've reposted this from another post because I've worked out the problem but still don't know how to solve it. http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=30033 First things first, here's the code Private Sub Command7_Click() Dim dbs As Database Dim rst As...
  12. crosmill

    Can't get this right :-(

    In the query builder are you putting the filter criteria on a different line, ie making it an OR query. So line 1 Date = x market1 = yes line 2 Date = x market2 = yes the SQL would be similar to WHERE Date = "x" AND market1 = "yes" OR Date = "x" AND market2 = "yes" hope this helps
  13. crosmill

    Data types

    Have you tried declaring the full name for the table, ie. Tables!TableName.ColName (not too sure of the syntax) Why isn't the text box based on the column? If you can't do this directly create a hidden text box based on the column, and use your code to update one Textbox to the other.
  14. crosmill

    Array's <Subscript out of Range>

    Dim dbs As Database Dim rst As Recordset Dim RanValue As Integer Dim noLoop As Integer Dim nolooped As Integer Dim AccNoOfRecords As Integer Dim RanNum As Integer Dim ln As Integer Dim sqlStr As String Dim RecordArray, NoOfRecords As Variant Still no joy :(
  15. crosmill

    Array's <Subscript out of Range>

    Thanks Dave, I retyped them as Dim dbs As Database Dim rst As Recordset Dim RanValue, noLoop, nolooped, AccNoOfRecords, RanNum, ln As Integer Dim sqlStr, NoOfRecords As String Dim RecordArray As Variant But with no joy. I think the problem is that it's reading NoOfRecords as...
  16. crosmill

    Array's <Subscript out of Range>

    OK I've worked out the problem but I don't know how to solve it. The code is putting all the values into the the array at point '0' So, if RanNum = 0 then it will call the array, but position 0 is all the values 1, 2, 3, 4...... etc When I've put the values into the array manually, in the...
  17. crosmill

    Array's <Subscript out of Range>

    I've checked the RanNum several times and it's always a whole number between 1 and the total number in the array. I tried taking the RanNum out and replacing it with a number, ie not a variable, and I still get the same error, which makes me think I'm doing something wrong with the array...
  18. crosmill

    Array's <Subscript out of Range>

    Thanks Travis I read abit more about Rnd and have changed the code to Randomize RanNum = (Int((AccNoOfRecords - 0 + 1) * Rnd) + 0) RanValue = RecordArray(RanNum) When you debugg it will tell you the value for each variable. RanNum is always a valid number??? but I'm not sure...
  19. crosmill

    Tab Order

    CMC Thanks for your response to my Tab Order Question. Unfortunately, it didn't work. The Tab Stop is set to yes for each field and the Tab Index has the correct number in each field. Any other suggestions. Thanks ------------------------------------------------ CMC, always use the forum so...
  20. crosmill

    Message to appear until query has run.

    I fell accross this before might of use to you, the only progress bars I've used are Flash Preloaders http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=30028
Back
Top Bottom