Results 1 to 8 of 8
  1. #1
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528

    You could use (DLookup) instead of (IIf)

    Hello all
    What do I do??

    I have a query based on two tables
    This model is based on the query
    Question


    I can not add value in the fields on the form
    But when you delete one of the tables, query and remains one table can be added here
    What is the reason?
    You could use (DLookup) instead of (IIf)
    Please help me
    ---------------------Click image for larger version. 

Name:	211.JPG 
Views:	12 
Size:	71.4 KB 
ID:	15321--------------------------------------------
    SELECT [TotalScores]/7 AS Expr1, IIf([Expr1]>=[Params1],[Computer],IIf([Expr1]>=[Params2],[Maths],IIf([Expr1]>=[Params3],[Statistics],IIf([Expr1]>=[Params4],[Medical]," ")))) AS Field, Right([yars],2) & "" & [NoAccepCentral] & "" & [field] AS Expr2, [Field] AS uu, tbStudents.StuID, tbStudents.NoAccepCentral, tbStudents.yars, tbStudents.StudentName, tbStudents.FigAla, tbStudents.City, tbStudents.HighSchool, tbStudents.Branch, tbStudents.TotalScores, tbStudents.University, tbStudents.Computer, tbStudents.Maths, tbStudents.Statistics, tbStudents.Medical, Table2.Params1, Table2.Params2, Table2.Params3, Table2.Params4
    FROM tbStudents, Table2;

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    There is no JOIN clause. These tables do not have a relationship. I don't think DLookup will work either. There is no way to determine which record in Table2 should be linked to each record in tbStudents.

    What is nature of data in Table2?

    Are those semi-colons actually working? I get an error when I try to use semi-colon.
    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
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Yes, thank you
    It's Digital
    I am using this expression in the picture works well
    I have you put this expression
    But over time this changes the arithmetic mean
    I do not want the school administration every season come back to me
    The model developed here would be controlled by the teacher in the calculation of these rates
    Click image for larger version. 

Name:	post-196269-1392064244_thumb.png 
Views:	12 
Size:	21.6 KB 
ID:	15323
    Click image for larger version. 

Name:	post-196269-1392064013_thumb.jpg 
Views:	12 
Size:	10.2 KB 
ID:	15322

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Need to save the ID of record from Table2 into a field in tbStudent. Then join the tables in query on those key fields. Then the associated Params fields are available for the expression in query.
    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
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Click image for larger version. 

Name:	post-196269-1392063000_thumb.jpg 
Views:	11 
Size:	15.7 KB 
ID:	15325Thank you very much
    How is it possible to explain more
    Or attach an example
    I will be very happy

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Are there multiple records in Table2? Must have a field in tbStudents to save the ID of a Table2 record. There must be a relationship between the tables.

    You did not answer my question of what data is in Table2.

    What is Table1 for? Why does it not have a relationship with any other table?

    The links shown in the image are not between primary and foreign key fields. StuID should not be linked to SecID.

    You need to get a better understanding of relational database principles. Maybe this will help http://www.rogersaccesslibrary.com/
    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.

  7. #7
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Table 2
    It's just numbers
    As Table 1 is a scientific sections
    Was transferred to the table tbStudents

  8. #8
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2012
    Posts
    528
    The problem is
    I can not change these numbers manually
    But when you delete a table 2 of the query can I change those numbers
    Click image for larger version. 

Name:	3333222.JPG 
Views:	8 
Size:	108.7 KB 
ID:	15329

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

Similar Threads

  1. Like in Dlookup
    By msp4422 in forum Programming
    Replies: 3
    Last Post: 02-19-2013, 04:02 PM
  2. Dlookup, please help
    By Anthony88 in forum Access
    Replies: 9
    Last Post: 04-17-2012, 11:33 AM
  3. DLookUp Help
    By ThaGreenMoose in forum Forms
    Replies: 10
    Last Post: 06-15-2011, 12:08 PM
  4. DLookup help
    By denners05 in forum Access
    Replies: 1
    Last Post: 06-11-2011, 12:55 PM
  5. May it is Dlookup
    By cap.zadi in forum Programming
    Replies: 3
    Last Post: 05-09-2011, 05:58 AM

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