• WSAndyAinscow

    WSAndyAinscow

    @wsandyainscow

    Viewing 15 replies - 376 through 390 (of 420 total)
    Author
    Replies
    • in reply to: autonumber #1779026

      A primary key WILL UNIQUELY define a row. If you fill multiple rows with the same data they are still different rows. For some reason the data may truly be duplicated.

      I personally like nice simple joins based on one field not linking four fields in the parent table to four fields in the child, especially if you have to write it in SQL (and if it could involve inner/outer joins). Why direct in SQL? you could be getting information from the database by an outside (eg C++) app as I do on occasions.

    • in reply to: Highlighting rows in tables with Javascript #515789

      Hi artAlexion,

      Thanks for your response however I am still having problems. Please could you look at the following HTML and tell me what I am missing.
      Thanks
      Andy

      function rowHighlight(rowID,rowColor) {
      document.table.rowID.bgColor=rowColor
      }

      hello world me
      2 3 4

      this

      and that
    • in reply to: autonumber #1778967

      Hi Grugeon,

      It is possible to reuse an autonumber if it has been deleted. You need to append a record with that number you wish to re-use. Obviously you can’t duplicate it.
      I would also say that having 2 autonumber fields, one for the Primary key and one for the other use (referential key?) is overkill. Why should it give Access problems. Also for you (as developer/user) the second autonumber field is effectively read only in that table.

    • in reply to: Convert FindIt recordset from DAO to ADO #515445

      The recordsetclone makes a copy of the recordset collection the form uses. This allows one to search (for example) and move to an explicit record in the form or to warn that it has not been found. If you tried to do that with the records the form is based on directly it will become very comlicated.

    • in reply to: Today’s date #515444

      How about a button next to the field called Today (surprise surprise). OnClick and you insert todays date into the field. Quick and self-explanatory.

    • in reply to: Javascript vs VBScript? #515296

      I am new to web page programming but I have experience with other languages. One says C programmers can adapt to Java while the structure of many things is very similar. I know for speed and control C and C++ leave Basic in the dust (I know it takes longer to write the prog in the first place). So is there any performance differences between VB script and Javascript? Are there things that one can do with Javascript and not with VB Script. This may help in this discussion.
      Personally I am going with Javascript as I don’t want to recode anything should a browser other than IE be used. After all have you never experienced the ‘Oh yes we have a corporate policy to use XXX’. Then three months later well actually we know support YYY as well due to our new acquisition.

    • in reply to: Access 2000 Security #1778408

      Whats the problem? I have user/group security on an Access 2000 database. It was set up by me just as one did in Acces 97 and works just fine.

    • in reply to: Subform query 2 #514446

      I would just like to recommend that the
      ‘Option Explicit’
      is set at the start of a module. This will trap spelling mistakes such as
      Dim lNumber as long
      lNumbeer = 5
      then test if something = lNumber

      The other point is for efficiency and declare the type of variable.
      Dim lNumber as long
      instead of
      Dim lNumber
      which sets it as a variant. Then the code will always have to convert it to a long when it is being used. Also I suspect the line
      lNumber = “6”
      would be accepted but not behave as one expects.

    • in reply to: Log Users #514335

      Are you interested in just when the user logs on or the duration of use of the DB? If you want the duration you may wish a hidden form that opens after start and uses the unload event to mark the session end.

    • in reply to: Subform query 2 #514334

      It was a special case with the view on the PopUps dependant on more than one other forms settings both for filtering and what data was displayed.
      Generally I won’t use them, however I forgot to add in the original post the variables involved were private, accessed through functions to help prevent naming clashes.
      The whole matter of the scope of variables is something I much prefer prefer using C++ with. With VBA I am always uncertain is this a copy, a reference or a pointer to an object when I pass it to another function.

    • in reply to: Hide tables programmatically #514333

      Back to your original question. Why do you want to hide them?
      I suspect you really want an answer concerning security in the database and hiding an object is not really anything to do with security.

    • in reply to: Sound, just for fun! :] #1778253

      Try adding the following code to the module. You may ned to to declare it as public, or have the call inside a module not on a form. (I hope it’s OK, I’ve just copied it from MSDN Library).

      Private Declare Function PlaySound Lib “winmm.dll” _
      Alias “PlaySoundA” (ByVal lpszName As String, _
      ByVal hModule As Long, ByVal dwFlags As Long) As Long

    • in reply to: Subform query 2 #514280

      There is a further technique that I use on occasions if I want to ‘synchronise’ a number of forms. Instead of passing a setting with openargs I have a module with a global variable and functions to set/read said variable. When a dependant form is launched from somewhere in the interface then the value can be read with the OnOpen event and appropriate action taken. It works, but for purists that dislike global vars it is not neat. Also it can be more awkward to debug if things go wrong and if an unhandled error ocurrs then one usually loses the value currently set.

    • in reply to: Hide tables programmatically #514245

      A general point in what you did. Do not blindly add or subtract like that. Test if the attribute is set before removing or that it is not set before adding otherwise you will not get what you want.
      For example attribue XX is 0 for off and 1 for on. You want to turn it on. If it is already on then after addition the value is 2 and is that off, on or the atrribute YY now switched off?

    • in reply to: Date formats in unbound text boxes #514210

      Erm. Just an aside. I develop on a Win 2000 based system with the English version of Win 2000 and Swiss German language settings (ie date same as English dd.mm.yy). The PC is over 2 years old (almost 3) now and it handles dates without a problem for Access 97 (english) and Access 2000 (German). So an older BIOS may not be the root of the problem especially as you said it only gives problems with 2 of the 3 date fields on the form. However I use bound fields. Do you do anything to the field contents before passing them to the Query?

    Viewing 15 replies - 376 through 390 (of 420 total)