Search results

  1. D

    need help plz

    You really need this converted, or you just want to run an executable in memory from a byte array? If it is the latter then you should be able to find what you need by Google searching "execute in memory from byte array vb6" but be very careful of any code you download because it has lots of...
  2. D

    Need HELP with Relationship Problem

    I don't fully understand how [t_DrUTX] relates to [t_visit] but it looks like it should be a left outer join. i.e. set the join type to "Include ALL records from 't_Visit' and only those records from 't_DrUTZ' where the joined fields are equal." Is it possible for Physician in [t_DrUTZ] to be...
  3. D

    DateAdd Problem

    I am glad to hear that it is now working. One last thing you could try to avoid renaming would be to use: rst.fields("Data_Início") rather than rst![Data_Início]
  4. D

    DateAdd Problem

    To confirm that the problem is not with the table, try create the recordset using: Set rst = db.OpenRecordset("SELECT [Seguro], [Documento], [Data Início], [Data Fim], [Data de Emissão], [Data Vencimento], [Situação], [Periodicidade] FROM [Fidelidade Mundial]", dbOpenDynaset, dbAppendOnly) or...
  5. D

    DateAdd Problem

    Did you try using "m" rather than Dateinterval.Month ? Also try assigning: rst![Data Início] = Now just to check that the problem is not related to the fieldname / table.
  6. D

    DateAdd Problem

    You need to fix the following line to put double quotes around the m or change to Dateinterval.Month if that works. rst![Data Início] = DateAdd(m, nPer, StartDate) rst.Close needs to happen after the Next, not before it. you can't use nPer = nPer * i (remove and use nPer * i in the...
  7. D

    Another question on else function! Please help

    mahenkj2 has the correct answer - you needed to move up one of the endif's. Here is the code which I reformatted to make it clearer to see the logic. Const CloseWarning As String = "If you close you cannot save this record at this time!" & vbCrLf & vbCrLf & _...
  8. D

    Another question on else function! Please help

    Did you consider doing this in the form_unload event so that the same logic fires however the form is closed? You should post the whole code as the code you posted has too many syntax and logic bugs in it. Please wrap the code in code tags to make it easier to read.
  9. D

    Still Getting Duplicates in listbox

    Maybe a subform in datasheet view? These can be very powerful but difficult to use.
  10. D

    Trying to Convert Text String to Numeric

    Here is 1 way to do it: Public Function bin2num(bn As String) As Long Dim result As Long, nLen As Integer, i As Integer nLen = Len(bn) For i = 1 To nLen If Mid(bn, i, 1) = "1" Then result = result + 2 ^ (nLen - i) Next i bin2num = result End Function
  11. D

    Still Getting Duplicates in listbox

    Try this: Private Sub lstQuerySelection_Click() On Error GoTo ErrorHappened Dim strQuerySelection As String Dim dbsPSU1 As DAO.Database Dim rs As DAO.Recordset If lstQuerySelection.ListIndex <> -1 Then strQuerySelection = "[" &...
  12. D

    Undefined Error, Combo Boxes Won't Select, Access 2007

    If you separate the following to two lines: Me.lstMeetingAttendees.Enabled = False: Me.lstMeetingAttendees.RowSource = "" then comment out Me.lstMeetingAttendees.Enabled = False and see if it helps. You are disabling a control while in the event for the control you are disabling which may...
  13. D

    Still Getting Duplicates in listbox

    What is output by "Debug.Print strSQL" ?
  14. D

    Still Getting Duplicates in listbox

    It looks like you need to: strSQL = "SELECT DISTINCT " & strQuerySelection & " FROM PSU1 ORDER BY " & strQuerySelection & " ASC" set rs = dbsPSU1 .OpenRecordset(strSQL, dbReadOnly)
  15. D

    Undefined Error, Combo Boxes Won't Select, Access 2007

    I would try commenting out pieces of the code until the strange behavior goes away so that you can home in on the issue. I personally would start by commenting out: Me.MeetingID = Null Me.MeetingDate = Null Me.MeetingLength = Null Me.MeetingBoard = Null...
  16. D

    Loop Help

    I don't think that the loop will help you. If loading the word document fails it probably displays a hidden dialog box . Your application will hang until the document opens so I would suggest making word visible to see what is going on. oWord.visible = True You might also want to kill...
  17. D

    Find, compare and replace in VBA

    You could create a public Function in a module and use that in the query. You can then test the function to make sure that it returns the correct value. This will let you use breakpoints and single step through the code to see what is happening.
  18. D

    How to import a directory listing into a table including dates and times

    If you want created/modified date you will need to use the fso object Public Sub listFiles(startFolder As String, Optional recurse As Boolean = False) On Error GoTo ErrorHappened Dim fso, folder, file, subfolder Set fso = CreateObject("Scripting.FileSystemObject") If...
  19. D

    replace entire case only

    so what should the string look like if your function did what you wanted it to do? "1,2,201,55,202,3,40,55, 555, , 222, " ?
  20. D

    Is Putting Double Quotes in a String possible?

    I agree. I would only use "" in a simple command like my example. In a complex command, I would use a Const or chr(34). I just don't like having to remember that 34 is double quote, 39 is single quote (when I am using TSQL), Alt-156 when I need a £ but have a US keyboard! You would have...
Back
Top Bottom