User Profile

Collapse

Profile Sidebar

Collapse
migi48
migi48
Last Activity: May 8 '12, 03:39 AM
Joined: Feb 7 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • migi48
    replied to multiple search
    in PHP
    Hello guys thanks for the replies,

    @Dormilich - That's what I'm actually trying to do. But unfortunately, I cannot figure out how can I enclose each element of the array by quotes using implode. Please teach me how to do that. Sorry for being new to PHP functions.

    @roshan ban - Are you suggesting to make a loop of SQL querries? I believe that it would only make the system slower?
    See more | Go to post

    Leave a comment:


  • migi48
    started a topic multiple search
    in PHP

    multiple search

    Hi! I'm trying to do a multiple search in my php code. I have an input text field where I input my wanted values then when I click the search button, An html table would show all my searched values from my database table.

    For example, I want to search multiple names(mark, jake, john, michael) <-- this is typed in a single text field separated by commas.

    Then it will go to another page which will show all records from...
    See more | Go to post

  • What happens when you run the query? Did you receive the same error? Or it runs successfully?
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    Hello NeoPa!

    Nevermind :D I figured to handle it by simply not showing records with NULL Date_Received in the query. :D Thanks so much again for the great help! :D You rock!
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    THANKS NEOPA! IT WORKED! :D

    "The other thing to check (as things seem to be coming together nicely) is that you check every record result carefully. Only one, hidden in there somewhere, which isn't either True or False will cause the query to fail."

    The last record produced and error and I just deleted it. :D
    However, How should I handle unreceived records? (records with no Date_Received) Can't I just...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    Hi NeoPa,

    I have implemented the new Code for the module. And it was able to remove the #ERROR's when running the query. I believe that it automatically inputs the date today? Im not really sure. However, when I ran some tests on adding WHERE clauses on the querry:

    Code:
    WHERE (Temp.Within)
    It still gives an error of "Data Type Mismatch". Now I dont understand the problem. without it, it successfully...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    I followed you instruction and removed my ByRef and added a parameter for the endDate as a Variant. I also already followed your code.
    Here's my actual code now:
    Code:
    Option Compare Database
    
    Option Explicit
    
    Public Function Workdays(ByVal startDate As Date, _
         ByVal varEndDate As Variant, _
         Optional ByRef strHolidays As String = "Holidays" _
         ) As Integer
    ...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    When I remove that WHERE clause, It successfully displays all records I want. Except it displays both TRUE and FALSE records. Records with NULL value for Date_Received displays #ERROR. I didn't see it as a problem before, since I know that there should be NULL values for Date_Received and the function just outputs #ERROR. And it still displays anyway.

    Hmmmm. Anyway I belive you and following your expert advice, how could I fix my code...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    Hi NeoPa,

    Hmmm..

    1. False
    2. False
    3. False
    4. True

    Yes ofcourse some Records still don't have Date_Receive value. simply because in the process, the actual form is still not received. So these records would be NULL. However my problem is not with UC_Create_Date and Date_Received. I believe that the Data Type mismatch refers to when I add the WHERE clause "WHERE temp.Within =...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    Hi this is my new SQL code

    Code:
    SELECT temp.Within
    FROM (SELECT ((Workdays([UC_Create_Date],[Date_Received])-1)<=7) AS Within FROM tbl) AS temp
    WHERE temp.Within = TRUE;
    I also tried = "True", = Yes, = "Yes", = -1, = "-1", = 0, ="0"
    I still receive data type mismatch. :(
    My expression for
    Code:
    ((Workdays([UC_Create_Date],[Date_Received])-1)<=7)
    ...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    Hi guys! So here's the module/functions:

    Code:
    Option Compare Database
    
    Option Explicit
    
    Public Function Workdays(ByRef startDate As Date, _
         ByRef endDate As Date, _
         Optional ByRef strHolidays As String = "Holidays" _
         ) As Integer
        ' Returns the number of workdays between startDate
        ' and endDate inclusive.  Workdays excludes weekends and
    ...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    @NeoPa

    Workingdays() is declared in a module. basically it computes the number of working days between a two dates. The function actually works. The return type of the function is a number which is the number of working days computed. The calculated field query is (If the working days between create_date and date received <=7 it will display true or Yes). I named that field "Within" which means it was received within 7...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    Hi guys!

    @Mihail - I did both methods but I still get same error :(

    @Taki - I already tried adding quotes but still same error :(

    @NeoPa - Good point! :) but when I tried to add

    Code:
    ((Workdays([UC_Create_Date],[Date_Received]) - 1) <= 7)
    in my SQL WHERE condition

    Code:
    WHERE (((CSP.UC_Create_Date) Between [StartDate] And [EndDate]) AND ((([CSP].[UC_Create_Date])>=[StartDate])<[EndDate]+1))
    ...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Criteria for a calculated field in a query
    But when I try to write the code, it gives me an error of:

    "This expression is typed incorrectly, or its too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression parts of the expresion variables."

    How could I get the variable of my calculated field? when I try [Within], it only prompts me to input a within parameter. :( but that...
    See more | Go to post

    Leave a comment:


  • migi48
    started a topic Criteria for a calculated field in a query

    Criteria for a calculated field in a query

    Hi!

    I need help on what criteria should I put in order for my query to display records where Within(fieldnam e of the calculated field) = Yes (it's a Yes/No format)

    This is my calculated field expression:

    Code:
    Within: IIf((Workdays([UC_Create_Date],[Date_Received])-1)<=7,-1,0)
    I only want to see records with the "Yes" or "-1" value :)
    See more | Go to post

  • migi48
    replied to Access add column by form data
    Haha. Good job. :)

    Like I said, I'm also a newbie in VBA and just trying to help. Sorry for my syntax errors. :D Thanks to TheSmileyCoder for also teaching me. :)
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Access add column by form data
    Hmmmm.

    try this instead:

    Code:
    currentdb.Execute ("ALTER TABLE table1 ADD COLUMN('" & me.ID.Value& "') Text;")
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Access add column by form data
    Hi,

    Have you tried putting the value of the textbox in a string first before you execute your sql code?

    something like this:

    Code:
    Private Sub savebutton1_Click() 
    mSaved = True
    Dim newColName As String 
    Set newColName = Me.txtNewColName.Value
    CurrentDb.Execute ("ALTER TABLE table1 ADD COLUMN " & newColName & "TEXT(50)") 
    MsgBox "Saved!"
    ...
    See more | Go to post

    Leave a comment:


  • migi48
    replied to How to change exist domain name
    in APIs
    I don't know. Sorry.
    See more | Go to post

    Leave a comment:


  • migi48
    replied to Form Filtering
    @NeoPa

    I did what you suggested and it's now working pefectly. :D
    Thank you so much for correcting me and explaining how it should be done. :D More power to expert programmers like you! :D

    Code:
    Private Sub btnFilter_Click() 
        Dim strFilter As String 
      
        With Me 
            If .txtFindCardNumber > "" Then 
                strFilter = Replace(.txtFindCardNumber,
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...