Microsoft Access ??? ??? ??????? ?? ??? ?????? ?? ???? ?? ??? Visual Basic ?? ????? ???? ????

???? ?????? ???? ??????
???? ID: 291533 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
?? ???? Microsoft Access ??????? (.mdb) ?? ???? Microsoft Access ????????? (.adp) ???? ???? ???

Moderate: ??? ??????, ??????, ?? ?????????????? ??????? ?????? ???

???? Microsoft Access 2000 ??????? ?? ??? ?? ???? ??, ?????210136.
???? Microsoft Access 97 ?? ??????? ?? ??? ?? ????, ?????143280.
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

?? ???? ???? ???? ?????? ?? ???? ?????? ?? ?????? ?? ?? ?? ??????????? ?? ??????? ?? ??????? ???? ?? ???? ??????? ?? ?? populates (?? ???? ??) ???????? ????????? ?????? ?? ??? ??? ????? Visual Basic ?? ????? ?? ??? ???? ?????? ??? ????? ?????? ?? ????? ??????? Northwind.mdb QuantityPerUnit ????? ?????? ?????? ??? ?? ???? ??? ?? ??? ???? ??????? ?? ???? ?? ?? ??? ????? ???? ??? ??????? ?? ???? ?? ????????? ??????? ?? ??????? ?????? ???? ?????? ???

???:: ?? ???? ????? ???? ?? ?? ?? ????? ??? ????? ?????, RptSmp00.mdb demonstrated.?? ????? ????? ??????? ???? ?? ??? ???? ???? ?? ???? ??? ???????? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
231851ACC2000: Microsoft Access 2000 ????? ??????? ?????? ??????? ?????? ???

???? ???????

Microsoft ???????????? ?????? ???? ???????? ?? ??? ??? ???? ??, ???? ??? ??? ?? ?????? ?? ?????????? ??? ??? ?????? ???? ?? ????.. ?????? ???????? ?????? ?? ???? ????? ???????? ?? ??? ???????? ????? ??? ?? ???? ?? ????? ???? ???.. ?? ??? ????? ?? ?? ?? ????? ?? ?? ??? ???????????? ???? ?? ?? ??????? ?? ?????? ??? ????? ????? ???????????? ?? ????? ?? ???? ???? ?? ??? ???? ?? ??? ??.. Microsoft ?????? ???????? ?? ????? ????????? ?? ???????????? ?? ?????? ??? ?????? ?? ???? ???, ??, ?? ?? ???????? ?? ???? ??????? ?????????? ?? ?????? ???? ?? ??? ???????? ??????????????? ?? ?????? ?? ???????????? ????? ?? ??? ??????? ???? ??????..????? ?????? ??? ????????? ?????? ?? ??? ??? Visual Basic ???OnFormat??????? ?? ???? ?????? ???????? ?? ???? ?? ??? ?? ??????? ?? ???? ???? ?????? ?? ??? ??? ?? ?? ?????? ??? ?? ???? ???ControlSource?????? ???????? ?? ???? ?????? ????? ???, ?? ????? ????? ?? ???? ?????

???????: ??? ?? ?? ?????? ??? ??? ????? ?? ???? ????, ?? ????? ??????? Northwind.mdb ??????? ????? ?? ????? Northwind.mdb ???? ?? ??????? ?? ?? ????????? ?? ????? ????? ?? ???? ???? ?? ??? ?? ?????

  1. ????? ??????? Northwind.mdb ??????
  2. ????? ???????? ?? ??? ??????? ?????? ???? ?????? ?? ?????? ??? ?? ??????? ????? ?? ??? ??????? ??????? ?? ????? ????:
    • ????? ????????? ??? ????? ????
    • ??? ???????? ?? ?????? ??? ???????
    • ProductName ?????? ????? ?????
    • ????? ??????? ?????? ?? ????? ?????
    • ????????? ???? ?? ??? ?????
    • ??????? ??? ??????? ??? ???

  3. ??? ??????? ??????? ?? ??????? ????? ??? ??????
  4. ????? ??? ????? ?? ??????? ??? ??????? ????? ?????? ??? ??????:
       Text box
       ----------------------------
       Name: Quantity
       ControlSource: <leave empty>
    					
  5. ?? ?? ?????? ??????? ??? ????? ????? ??? ???? ????????:: ?? ??? ??? ????? ??? Microsoft ???? ?????? ???????? ?? ????? ???? ??? ?? ??? ??? ?? ????? ?? ???, ?? ??? Microsoft DAO 3.6 ???????? ????????? ?????? ???? ?????? ??? ???? ?? ???, ????? ??????????????? ????????????? Visual Basic ?????? ???, ?? ????????? ???? ?? ??Microsoft DAO 3.6 ???????? ???????????? ????? ????? ???

    Function FillRep()
    Dim rs As DAO.Recordset
    Dim db As DAO.DATABASE
    
    Set db = CurrentDb()
    Set rs = db.OpenRecordset("Products", dbOpenDynaset)
    
    rs.MoveFirst
    rs.FindFirst "[ProductID]=" & Reports![Fill Report]![ProductID]
    
    ' Use this line if the function is called from report
    ' detail section's OnFormat property event procedure.
    Reports![Fill Report]![Quantity] = rs![QuantityPerUnit]
    
    ' -or- use this line if the function is called from the
    ' ControlSource property of the unbound control.
    FillRep = rs![QuantityPerUnit]
    End Function
    
    					
  6. ??? ????OnFormat??? ?? ????? ??? follows ?? ??? ??? ??????? ??:
    =FillRep()
    ???::?? ?? ?? FillRep() ?????? ??? ?? ???? ???ControlSource?????? ?????? ??? ?? ??? ??????????? ?????:
       Name: Quantity
       ControlSource: =FillRep()
    						
    ??? ?? ?? ???? ?? ????? ????, ?? ??? 5 ??? ??? ?? ?? ?????? ?? ????? ??? ??????? (') ?????:
    Reports![Fill Report]![Quantity] = rs![QuantityPerUnit]
    
    					
  7. ??????? ?? ??????????? ????? ????? ??? ?? ??????? ?? ?????? ??? ????? ????????? ?????? ?? ??? Visual Basic ?? ??? ???

???

???? ID: 291533 - ????? ???????: 17 ??????? 2011 - ??????: 3.0
???? ???? ???? ??:
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
??????: 
kbreport kbprogramming kbhowto kbmt KB291533 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:291533

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com