Search results

  1. C

    Grayed out command buttons on forms

    you've got controlname.enabled=false somewhere!
  2. C

    Totalling times in hours and minutes

    Would DateDiff work? ie DateDiff("h",StartDate,EndDate) would return the total no of hours between the two date variables (which as you know can contain a date, a time or a date and a time) The "h", means hours, you could also have, "n" for minutes, "s" for seconds, "ww" for weeks etc. doh:)...
  3. C

    How do I select a range of records?

    ah:) you need the right click menu! Right click on the index field in the table. In the 'filter for' space put '>8000 AND <150000', without the quotes. This filter for box can take any thing that would be a valid SQL WHERE clause. So if its a date field then 'BETWEEN' would work etc. If its...
  4. C

    Creating an adventure game in Access

    3: don't is the simple answer, images do not work in databases. store the path to the image instead. The highest quality is uncompressed, and the most common uncompressed format that will be easiest to work with in access would be .bmp!
  5. C

    Best practice form design

    though on lower spec machines 2 would be nicer performance wise.
  6. C

    FileCopy Problem

    I've found an interesting problem: FileCopy doesn't seem to want to copy 0 byte files, it reports a file not found. Which would be ok and understandable, cept that explorer lists the files! :confused: So does an empty file exist or not? is 0 something or nothing? slightly inconsistant...
  7. C

    Is Form Open

    heh? I did post it!! :) ok it was only the core of the function but hey it was early :D
  8. C

    Is Form Open

    or slightly better: If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then If Forms(strFormName).CurrentView <> 0 Then IsLoaded = True End If End If This is also handy with reports and forms: Public Sub Suspend(ByVal sName As String, Optional ByVal CheckBoth As Byte =...
  9. C

    Left() Right() Trim()

    huh? thought this indicated a problem with your references! as them functions are perfectly valid in 2000, and don't need any thing special installing. uncheck all your references, close the dialog, then go in a recheck them all, then do a full compile, should help. There is some code that...
  10. C

    Small problem with the following code.

    yea, as your not storing 'new', 'original' data you need to look at using a query to change the 'view' of your current data.
  11. C

    Import files

    urm then how do you know which files to import? mFilename1 = Dir(mPath & "file*.*") would make the code process all files starting with file, ie you can use the normal wildcard's in the dir cmd. also how do you know all the files are going to be the same format?
  12. C

    Import files

    This line: mFilename1 = Dir(mPath & "*.acy") is the one that needs changing each time. You'll probably need to loop through the whole code with each extension you want to import.
  13. C

    Small problem with the following code.

    mmm, why do you need that 2nd table? It doesn't 'do' anything, its the same as the first just displayed differently.
  14. C

    Startup Menu code

    as far as i know you can't run code using variables, ie call "mysub" will not run mysub. A quick fiddle seems to show that you can't use: Module1("mysub") either. Based on that you can not create truly dynamic, changing code. So you can either use a select case statement that basically...
  15. C

    Define Autonumber Position

    no, an autonumber is pretty much gaurnteed to be unique (that is its main job in life), if you could alter it...well...its uniqueness would be questioned. If I have a problem where the program/user wants an id thats unique but in some funny format then I tend to have two ID fields. The...
  16. C

    recordok

    Yes it would have to be declared first a simple (dim RecordOk as boolean, though I'd use 'b' prefix). Depending on your how you validate and save your record this variable might need to be accessible for multiple procedures on the form. So at the top of your form code after the 'Option...
  17. C

    Define Autonumber Position

    If for some reason you really do want autonumber to start at x then you could do something like for x=currentautonumber to autonumberwanted create record delete record next that 'orrible hack would do what you want.
  18. C

    recordok

    99% sure its not a built in thing, so its probly a boolean that people use during validation, its starts of false, and if it passes validation its true and gets saved. and it just happens to be used by a lot of people.
  19. C

    Small problem with the following code.

    its because you have a movenext in the first if. The do loop starts because you have 1 rec, then the movenext then screws things up. basically I would say the logic is slightly off:) I would restate what your trying to achive in this bit and start coding from fresh.
  20. C

    Code to open report from Combo box

    Ok it sounds like you need to check that the query behind the report works the way your expecting. Open the report in design view, and then open the query behind it. Run the query, make sure it returns what you expect. Then manually add the date restricition (ie in the criteria row under the...
Back
Top Bottom