Results 1 to 5 of 5
  1. #1
    Eranka is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    150

    Two Formulas Inside One IF Function

    HI

    Code:
    If Frame3 = 1 Then
    strRowsource = "SELECT [Titile],[Surname],[Given_Names] AS [Given Names],[Marital_Status] AS [Marital Status],[Country_Of_Residence] AS [Country of Residence],[Email],[Mobile_Number] AS [Mobile Number],[Home_Phone_Number] AS [Home Phone Number],[Address] " _               
                    & "FROM Alumni_List " _
                    & "WHERE [Mobile_Number] Like '*" & Me.txtSearch.Text & "*'"
    
    
    strRowsource2 = "SELECT SELECT [Course_Completed] AS [Course Completed],[Other_Courses_Followed] AS [Other Courses Followed],[Student_ID] AS [Student ID],[Year_Of_Completion] AS [Year Of Completion],[Completed_Semester] AS [Completed Semester] " _
                    & "FROM Alumni_List " _
                    & "WHERE [Mobile_Number] Like '*" & Me.txtSearch.Text & "*'"
    Please see above, is this the correct way to use two functions inside one IF loop.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    All you are doing is populating 2 variables which is not a problem. What are you really trying to accomplish?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Eranka is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2017
    Posts
    150
    Hey

    creating a search form, but above code doesn't working and no error messages as well.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Code shown is not a complete procedure. Just setting a variable doesn't do anything.

    Review http://allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Hmm, where's the rest of the code? What are they feeding a Combo Box, List Box? Do you requery the controls after altering the row source?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-24-2018, 07:58 AM
  2. Updating function inside a module
    By keiths in forum Modules
    Replies: 3
    Last Post: 04-05-2017, 08:10 AM
  3. Formulas
    By joh344 in forum Queries
    Replies: 33
    Last Post: 04-22-2014, 12:15 PM
  4. Replies: 1
    Last Post: 09-05-2012, 07:04 AM
  5. Formulas
    By dunnmel4 in forum Access
    Replies: 0
    Last Post: 03-27-2011, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums