Search results

  1. Bodisathva

    FIND Speciffic record and USE it using VBA

    Replace the RsCur with a DLookup... strDBCura = "Update " & RsType!sobpdebit & " set DebitDBN = Debits * " & DLookup("CUR","CURRFG", "SOBP = '" & RsType!SOBP & "';" I wrapped the criteria of the DLookup with single quotes, assuming it was a string, if it's a number, remove them...
  2. Bodisathva

    Calculated values used in naming

    Dim i as Integer For i=0 to me.Controls.Count-1 Me.Controls(i).Visible = False Next i
  3. Bodisathva

    SQL in VBA error in syntax?

    First off, just to make sure we are on the same page, you know that: Set RsType = CurrentDb.OpenRecordset("SELECT SOBP, SOBPDEBIT FROM RFGDebitNotes ;") produces a recordset, not a single answer, correct...
  4. Bodisathva

    SQL in VBA error in syntax?

    You cannot reference the recordset you just created in code in another SQL statement...it must be compiled into the DB for the SQL statement to recognize it. Using Nested SQL statments will get you where you want to go.
  5. Bodisathva

    Calculated values used in naming

    Me.Controls("Text" & CurrNumber).Visible = True
  6. Bodisathva

    Cut and pasting code

    look for an app called "pretty code print"
  7. Bodisathva

    parse a string and insert result into new field

    Let me try to save you some coding Barry: (no offense intended, Dennis) in a function: Dim charLoc as Integer Dim extLoc as Integer Dim a as String a = "\\server\ehealth\StrayDogs\DogPics\2007\012345.jpg" charLoc = (InStr(1, StrReverse(a), "\")) - 2 extLoc = (InStr(1...
  8. Bodisathva

    Remove HTML code from a string

    startPOS = InStr(1, a, "<DIV") - 1 While startPOS > 0 endPOS = InStr(1, a, "</DIV>") + 5 strLeft = Left(a, startPOS) strRight = Right(a, Len(a) - endPOS) a = strLeft & strRight startPOS = InStr(1, a, "<DIV") - 1 Wend assuming you will always be...
  9. Bodisathva

    Remove HTML code from a string

    Dim a As String Dim strLeft As String Dim strRight As String Dim startPOS As Integer Dim endPOS As Integer a = "This is part one of the string <DIV style=""padding:5px; FLOAT: middle; MARGIN: 5px; WIDTH: 88; BACKGROUND-COLOR: #cccccc; height:8"">" & _ "<font...
  10. Bodisathva

    Design issue

    Unfortunately, if you are going to enforce the referential integrity, this will happen unless you are willing to create new entries for each change or archive off historical data so that it is no longer part of the enforcement.
  11. Bodisathva

    how to compare before and after

    As I see it, you have two choices: Create a new column which designates the Before/After status of the entry If you are using an auto number sequence as a primary key, there will be two entries per student, the lesser number will be the before eval, the higher number will be the after.
  12. Bodisathva

    short date/time check routine

    establish a validation rule for the field and that will restrict the data entry
  13. Bodisathva

    The Next Goverment

    ...and using the Queen's English, he might be able to spell, too :D
  14. Bodisathva

    short date/time check routine

    modify the Input Mask for the text box instead: '#0/#0/00##' will only allow up to two numbers(leading zeroes not mandatory) followed by the slash, up to two numbers, slash, up to four numbers. To make the numbers mandatory, use '00/00/0000'
  15. Bodisathva

    The Next Goverment

    you'd prefer Quick Draw McCheney, perhaps? :D
  16. Bodisathva

    The Next Goverment

    after being unable to find a suitable candidate for PM or come to an agreement, the UK will give up hope... ...the US, seizing upon the opportunity, will offer up GWB as a replacement :eek:
  17. Bodisathva

    opening multiple items with one button

    in your form: Private Sub Combo0_Change() Select Case Me.Combo0 Case 1 Do this... DoCmd.OpenForm "myFormName" DoCmd.OpenForm "myOtherFormName" Case 2 DoCmd.OpenReport "thisReport",acViewPreview...
  18. Bodisathva

    Open Explorer in Full screen with Shell

    I believe the proper argument for the shell command is vbMaximizedFocus, but you'll get the options if you type a comma after your commandline. after opening, you could also use SendKeys to pass the "F11" full-screen command as well
  19. Bodisathva

    Run-time Error '2471':

    Your Criteria in the DCount function is comparing a String, therefore the criteria must be wrapped in quotes or DCount looks for a variable with the string name you passed: DCount("[strModelNo]", "[tblAJL_Test]", "[strModelNo]='" & Me![txtModelNo] & "'")
  20. Bodisathva

    Refreshing Linked Tables

    I get this error between users. The local repository location, in my case, is within the user's My Documents folder, which exists in C:\Documents and Settings\USERNAME\My Documents ...the USERNAME portion must be assembled prior to relinking the tables on application startup. Essentially the...
Back
Top Bottom