Search results

  1. C

    How to skip "blank fields"?

    You have to use a Carriage Return *and* a Line Feed. You can put this in an unbound textbox on the report (remember to set the "Can Grow" property to yes). IIf(isnull([AddressLine11]),"",[AddressLine11]+Chr(13)+chr(10))+IIf(isnull([AddressLine12](,"",[AddressLine12]+Chr(13)+chr(10)) ...
  2. C

    help pls! weird table behavior

    I don't know if this is the problem but you might want to have a look at this link: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q230125
  3. C

    Something wrong with this IIF statement?

    :IIf((DatePart("m",[start date])=5 And DatePart("d",[start date])>15) Or (DatePart("m",[start date])=8 And DatePart("d",[start date])<16) Or (DatePart("m",[start date])>5 And DatePart("m",[start date])<8),"summer","academic year")
  4. C

    Date format problem using INSERT INTO

    You have to enclose dates with "#": DoCmd.RunSQL "INSERT INTO Items_Checked_Out (account_number, product_id, due_date) VALUES (" & acctNum & ", " & pID & ",#" & dueDate & "#)"
  5. C

    Date Calculation

    How about this: =IIf(Weekday([yourdatefield],6)<4,[yourdatefield]+(5-Weekday([yourdatefield],6)),[yourdatefield]+2)
  6. C

    Problem with upper lower case join

    In other words you want the join to be case sensitive: AbC to AbC But not AbC to abC Is this correct?
  7. C

    parse field data

    You have to strip them off one at a time. The string doesn't get any longer than the three field I hope - each expression gets a little hairyer. Expr1: Left([yourfieldname],InStr([yourfieldname],":")-1) Expr2...
  8. C

    Directory listed on a form :getting closer?

    I believe you wanted to list files in a directary in a listbox on your form? Go to the properties list for your listbox (I used the name "Test1" for the listbox in the code below) and change the "Row Source Type" to "Value List". The code below will list all files in the specified directory in...
  9. C

    Newbie If...Then question...please help

    In the query that your form is based on enter something like this in a new field: CustAddress:iif([shippingaddressfield] is null,[billingaddressfield],[shippingaddressfield]) You then reference CustAddress in your form.
  10. C

    Fraction to decimal

    You have to convert to a decimal first: =Left([textboxname],InStr([textboxname],"/")-1)/Right([textboxname],Len([textboxname])-InStr([textboxname],"/"))
  11. C

    Autonumber Lines on a report

    Just add a textbox to your detail section and set the Control Source to "=1" and the Running Sum to "overall".
  12. C

    DLookUp Help Again

    Try this instead: If Tamuid is a number field: DLookup("LastName", "Registrasi_Tamu", "TamuID =" & me![TamuID]) If Tamuid is a text field: DLookup("LastName", "Registrasi_Tamu", "TamuID ='" & me![TamuID]& "'")
  13. C

    Add IF statement to converted macro

    Try this: With Application.FileSearch .LookIn = "\\Dilbert\Data\Recruitment\Students\2002_Master_Employer_Database" .Filename = "Job_Search.mdb" .MatchTextExactly = True .FileType = msoFileTypeDatabases .Execute If .FoundFiles.Count = 0 Then MsgBox "Database not found" Exit...
  14. C

    Apostrophe in SQL Statement

    Just use double quotes: "SELECT [table 1].* FROM [table 1] WHERE [table 1].textfield=""" & strText & """;"
  15. C

    Linking a picture to a value in a combo box?

    In the afterupdate event of your combobox use something like this: Private Sub Combo1_AfterUpdate() Select Case Me!Combo1 Case Is = 1 Me!Image0.Picture = "PatchandNameofImage1" Case Is = 2 Me!Image0.Picture = "PatchandNameofImage2" Case Is = 3 Me!Image0.Picture = "PatchandNameofImage3" Case Is...
  16. C

    Need help with primary key problem

    Do the misc. items all have IDs starting with "m"? If so all you have to do is something like: if left(me!IDtextbox,1)<>"m" then if dcount("*","yourtablename","ID = '" & me!IDtextbox & "'")>0 then msgbox "Duplicate ID" end if end if
  17. C

    Invalid Functions

    You have a problem with the references on the pc you moved to. Go to the VB editor, tools, references and uncheck anything that says "Missing".
  18. C

    Easy Question

    Try this: Me.Recordset.FindNext "[NUMBERFIELD] = " & n
  19. C

    How to write a txt file based on table info?

    Something like this should do it: Dim rst As DAO.Recordset Set rst = CurrentDb.OpenRecordset("table1") Dim fs, TextFile Set fs = CreateObject("Scripting.FileSystemObject") Set TextFile = fs.CreateTextFile("c:\testfile.txt", True) Do Until rst.EOF = True TextFile.WriteLine ("C:\softjuke\files\"...
  20. C

    Script Help

    When you've come out of the loop and are entering the last record: rsDestination.Fields("Question_Number") = strQuestion should be: rsDestination.Fields("Question_Number") = strPrimaryQuestion
Back
Top Bottom