Search results

  1. Jibbadiah

    Query with multiple selections from a listbox PROBLEM!!

    You are getting closer... For an IN statement you want your query to look like this. 'if Field is text Select * from Tablename where Field in ('203', '204', '205') Or 'if Field is numeric Select * from Tablename where Field in (203, 204, 205) So your error shows that you have extra text...
  2. Jibbadiah

    Leg Pain

    cjert, Agree with rainman... you have the classic symptoms of a groin strain. I had a pretty bad case once. I went to the doc and he told me to take ibuprofen to ease the swelling. Didn't know what he was talking about because I didn't see any swelling, but sure enough, as soon as I took the...
  3. Jibbadiah

    Query with multiple selections from a listbox PROBLEM!!

    The yourfield is whatever the listbox is referring to. What field do you restrict your query to when you use the values from the list box? (i.e. 201 or 202 or 236). You can use the strWhereClause in a recordset, a report, a querydefinition or a d function... like dcount. Try experimenting...
  4. Jibbadiah

    Query with multiple selections from a listbox PROBLEM!!

    Here is some code from my multi-selection list box. If the field is text you will need the code below... if it is numeric you should change the -3 to a -1... this will remove the trailing comma (whereas the -3 removes trailing comma and quotes). 'Select Contents from Listbox strParams...
  5. Jibbadiah

    Can anyone tell me why a programmer would put this code in?

    Sorry DK.. .you are right... you should ask questions. I guess I was responding like that because I figured I had already given you enough info to go on... "If anyone else has suggestions, please let me know" All I meant to say was that if you Only ask questions you won't learn... you need to...
  6. Jibbadiah

    Error msg

    Reda, You could look at some of the following: - Under Table Properties is the format, input mask or validation rule set? - If the table is bound to a table/query can you update the record directly there? If not then this is the problem rather than the form. - Check the properties of the...
  7. Jibbadiah

    Can anyone tell me why a programmer would put this code in?

    intLen = Len(Dir$("T:\" & strPathPrefix & "\" & Format(Date, "YYYY") & "\" & Format(Date, "MMDD") & "\CDLS\" & varFileName)) This should be exactly what you are after. As Bob suggests you shouldn't hardcode the value - the previous guy was probably being lazy. I am presuming that there is a...
  8. Jibbadiah

    Cut and Paste contents of a field with a Macro

    Short answer Yes... but I doubt you are doing things correctly if this is what you need. Rather you should be storing the date in a table and referencing the previous date through a query. Likewise if this is referring to an excel spreadsheet you should be working on a function or logic that...
  9. Jibbadiah

    Can anyone tell me why a programmer would put this code in?

    ... because I know that someone will correct me... you would actually simplify the end from & "\" & "CDLS\" to & "\CDLS\"
  10. Jibbadiah

    Can anyone tell me why a programmer would put this code in?

    DK, As a tip... the use of quotes (") opens a section of text and the ampersand (&) adds a variable that has been declared elsewhere. The difference is when the quotes are used in a function like in the case of Format, which is the function used to format a date... the quotes here are used to...
  11. Jibbadiah

    Error msg

    Hey Reda... how's things mate? Try looking at the following form properties: Allow Edits Allow Deletions Allow Additions Allow Data Entry Also check that you can update a record in the table directly. James
  12. Jibbadiah

    FTP Directory File Listing

    Not quite. I have attached 2 files for you. Download_BAT.txt -- update the <IPaddress> with the required IP -- rename the file to Download.bat Download.txt -- update your user and password. save them to c:\temp double-click the .bat file and then view the dirlist.txt file to see what has...
  13. Jibbadiah

    Can anyone tell me why a programmer would put this code in?

    Paste this in a module and run it... it will show you what you have. Then you can adjust it until you get what you desire. Public Function test() Dim strtest As String Dim strPathPrefix As String Dim varFileName As Variant strPathPrefix = "temp" varFileName = "testfilename.txt" strtest =...
  14. Jibbadiah

    FTP Directory File Listing

    Geoff, You can create a .bat file and run the "ls" command against the server directory in question. strParameters = "c:\temp\Download.txt" strBAT = "c:\temp\Download.bat" Open strBAT For Output As #1 Print #1, "ftp -s:" & strParameters & " IPaddress > c:\temp\dirlist.txt"...
  15. Jibbadiah

    Accessing MySQL tables using FTP

    Treason is right... it is difficult but it can be done. Create some code that runs ftp through bat executable files. Your bat file would have something like: ftp -s:c:\temp\FTPc2s.txt <ip address> Your FTPc2s.txt file would contain: <username> <userpassword> hash on ascii on verbose put...
  16. Jibbadiah

    Email from Access

    Ed, As an alternative you could try this... Public Function SendEmail(strEmail As String, strSubject As String, strEmailBody As String, blnSend As Boolean, Optional strAttachment As String) PROC_DECLARATIONS: Const sProc_Name As String = "EmailTASSurvey" Dim olApp As...
  17. Jibbadiah

    Find first Sunday on or after the 6th of the Month?!

    OOPs... meant that to be the 6th... lol... doh!!
  18. Jibbadiah

    Find first Sunday on or after the 6th of the Month?!

    I found an old post from Bat17 that helped a lot... so have come up with the following... Dim dDate As Date dDate = DateSerial(Year(Date), Month(Date), 7) Do While WeekDay(dDate, 1) <> 1 dDate = dDate + 1 Loop dDate = Format(dDate, "dd/mm/yyyy") MsgBox dDate Also used the...
  19. Jibbadiah

    Find first Sunday on or after the 6th of the Month?!

    I have some code to do this but it is long and laborious (and to be honest... quite rubbish) and I would love to see what other people can come up with... something short and sweet that does the job and nothing more. When I set-up my code a couple of years ago I remember having all sorts of...
  20. Jibbadiah

    Combo populated from value list (browse directory) -- Only want to sort list.

    Folks, I have been using a piece of code from Ghudson for some time and it works really well. It is used to display the files in a directory as a value list in a combo box. I use it as a way of allowing the users to link to archived files and reload them if they need to view an old report...
Back
Top Bottom