Search results

  1. nanscombe

    Using an array for Lookup

    You could write a function along the lines of ... Public function str2Num(byval theString as String) Dim lngIndex as Long, strChar as String, strTemp as String strTemp = vbNullString For lngIndex = 1 to Len(theString) strChar = lcase(Mid(theString, lngIndex,1)) Select Case strChar...
  2. nanscombe

    Strange ID Problem

    Then you may need to wrap nz() around the other side of the criteria as well. nz(ID, -1) = nz([Forms]![formname]![comboname], -1) That assumes that the field ID is the foreign key (link) to another table) If however you have a default value for ID in your table, ie 0, you would use that...
  3. nanscombe

    Strange ID Problem

    Is it a combo box of names that returns an ID (number)? If so you might try = nz([Forms]![formname]![comboname], -1) That would return either the value in [comboname] or -1 if it were null / unselected. Assuming you don't have a record with an ID of -1. I sometimes use a value of -999...
  4. nanscombe

    Strange ID Problem

    Are you building the criteria and using 'Like' ID somewhere? I would suggest that you "Debug.print" the result of your criteria building, to the immediate window, or output it to a MsgBox to see what is actually being passed.
  5. nanscombe

    Database for specific computer, help expert please

    How about getting the MAC address of the network adapter? Either that or create a file somewhere on the hard drive, mark it as a system file (which would effectively hide it), and check for its existence.
  6. nanscombe

    "Borrowed" name for Form's Text Box... how to?

    Close. Try ... For i = LBound(arrDias) To UBound(arrDias) Me.Controls("TJan" & Format(i, "00")).Visible = True Next i Using "00" ensures that Format() returns a string with a leading zero if appropriate.
  7. nanscombe

    How do I hide a tab if a checkbox is checked

    I can't see anything wrong with the code and you could actually shorten your code to ... Oh, hang on. By using the Form_Load event the control might not be loaded properly yet. Try using Form_Current instead. Private Sub Form_Current() ' You can't hide a tab when it holds the focus If...
  8. nanscombe

    Medical forums

    I was actually meaning that I don't know how much useful information that you will get from this forum as the knowledge seems to be mainly about Access. A lot of people may simply look at the thread and think that it is not of interest to them. Also, I haven't come across many Frenchmen on...
  9. nanscombe

    Medical forums

    I don't know what you're likely to get from this forum on french medical terms? French Medical Terminologyhttp://france.angloinfo.com/healthcare/medical-terminology/ The French National Cancer Institute - Dictionnaire And their "Who are we" page ... The French National Cancer Institute
  10. nanscombe

    Avoiding/replacing CRLF

    I've had a bit of a play and come up with an idea of how to produce an adjusted count of the characters in the textbox. You could allow the textbox to accept a few more characters to compensate whilst displaying a corrected character count.
  11. nanscombe

    Avoiding/replacing CRLF

    You could always strip out the unwanted carriage returns just before you send the message. <LF> (linefeed ) is character 10, <CR> (carriage return) is character 13, <space> is character 32. ' Replace CRLF with LF only. Me.Mailtext.Text = Replace(Me.Mailtext.Text, Chr(10) & Chr(13), Chr(10)) '...
  12. nanscombe

    Are you an atheist?

    Not bad Mihail, I do keep an eye on what's going on around here, I just haven't posted a lot recently.
  13. nanscombe

    Are you an atheist?

    For the sake of Anglo American relations here is a List of words (A - L) having different meanings in American and British English courtesy of Wikipedia. It's quite long, there is also part M - Z. Here's a bit of Canadian while we are at it... Canada-UK Dictionary
  14. nanscombe

    VBA to change extension

    Bearing in mind they would be able to do it outside the program anyway. Are you trying to get someone to change the name of a file through your program? Do you want to be able to detect whether they are renaming a file from ". accdr" to ". accdb" and only allow it if they enter the correct...
  15. nanscombe

    Searching for partial primary key

    Access interprets what you have written, not what you meant to write, in other words Access behaves correctly for the input it is given. < "11" means treat the left hand side of the equation as a string of characters < 11 means treat the left hand side of the equation as a number. Unlike the...
  16. nanscombe

    Are you an atheist?

    There might be a powerful being, who created the Earth, out there but what happens if others of their kind turn up? Would he cease to be the God, and simply become a god, or just a powerful alien who would likely be feared, resisted and fought.
  17. nanscombe

    Form Closes Even Though Close is Canceled

    Unless I'm missing something, or you are, where does Cancel get set to the value of bPreventClose? I'm assuming its in Form_Unload(). You're probably going to have to use single step mode (F8), and set a Watch, to track the value of bPreventClose to see it if gets changed back to False somewhere.
  18. nanscombe

    Database on laptop then transfer to desktop

    From what you say about being an inventory I imagine you'll probably have a lot of data which would be static as far as the laptop was concerned; Locations, people, substances. These will probably only travel in one direction (Desktop -> Laptop) Then there will possibly be other data about how...
  19. nanscombe

    Database on laptop then transfer to desktop

    Continued from the post above ... I would have two versions of each table in the database. The first would be the table proper (as a link) where the data was stored. The second would be a link to where the external data would be imported / exported . I would then have two Update queries...
  20. nanscombe

    Database on laptop then transfer to desktop

    I used to employ three special fields in my databases: ID - A programatically generated Long ID based on instance of the database Deleted - Boolean flag to signify a record is no longer in use. if you physically delete a record, but consolidate it with other datafiles, the record may reappear...
Back
Top Bottom