Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update Conflict Error Message
Message
From
26/05/2005 14:15:28
 
 
To
26/05/2005 13:18:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01017883
Message ID:
01017907
Views:
16
Winifred,

Does this work for you?
SET ORDER TO PINVACLot IN lots
lcPVL = dlot.Pin + dlot.vaccine + dlot.Lot
SEEK lcPVL IN Lots
IF FOUND() AND RLOCK()
   gcLotNumber = DLot.Lot
   IF distrib.Lot = 'NOT RECEIVED'
      REPLACE Distrib.Shipped WITH 0
      REPLACE Lots.SIZE WITH DLot.SIZE
      IF LOWER(THISFORM.NAME) = 'frmdistribution'
         THISFORM.chkShipped.ENABLED = .F.
      ENDIF
      THISFORM.txtShortName.CONTROLSOURCE = 'DLot.Maker'
      THISFORM.txtSize.CONTROLSOURCE = 'DLot.Size'
   ELSE
      THISFORM.txtShortName.CONTROLSOURCE = 'Lots.Maker'
      THISFORM.txtSize.CONTROLSOURCE = 'Lots.Size'
      IF LOWER(THISFORM.NAME) = "frmdistribution" AND thisform.editmode
         THISFORM.chkShipped.ENABLED = .T.
      ENDIF
   ENDIF

   IF thisform.editmode
      SET ORDER TO PINVACLot IN lots
      lcPVL = dlot.Pin + dlot.vaccine + dlot.Lot
      SEEK lcPVL IN Lots
      THISFORM.txtShortName.REFRESH()
      THISFORM.txtSize.REFRESH()
      THISFORM.txtDoses_Available.REFRESH()
      SET ORDER TO lot IN lots
   ELSE
      SELECT Lots
   ENDIF

   IF LOWER(THISFORM.NAME) = 'frmdistribution'
      THISFORM.txtExpiry.REFRESH()
   ENDIF

   SELECT Distrib

   IF !EMPTY(Distrib.PIN) AND !EMPTY(Distrib.FromPIN) AND LOWER(THISFORM.NAME) = "frmdistribution"
      THISFORM.cmdAllow.ENABLED = .T.
   ENDIF

   THISFORM.spnDoses.KEYBOARDLOWVALUE = 0
   THISFORM.spnDoses.SPINNERLOWVALUE = 0

   IF Lots.SIZE  0
      IF Distrib.Doses < Lots.SIZE
         REPLACE Distrib.Doses WITH Lots.SIZE
      ELSE
         REPLACE Distrib.Doses WITH INT(Distrib.Doses /Lots.SIZE) * Lots.SIZE
      ENDIF
   ENDIF

   IF THIS.STYLE = 2
      THIS.STYLE = 0
   ENDIF
      SELECT Lots
      SELECT(lcAlias)

   RETURN 1
ELSE
   * No need to give them choices, just tell them whats happening
   = MESSAGEBOX("Record is being edited ... Please try again later",64)
   RETURN 0
ENDIF
Regards,
Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform