Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with my code
Message
From
29/07/2002 09:57:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Problems with my code
Miscellaneous
Thread ID:
00683493
Message ID:
00683493
Views:
50
Hello, i have two problems that i need to solve.

The first refers to an saving button and this consists:
when you try to save a record i first check if the number exists already in the database after this it proceeds to save or not, but in both ways it saves the record and always says that founds the new ticket that i'm introducing and i don't know why.
This is my code:
set step on
select llamadas
go top
set exact on
set order to ordenproc
with thisform

seek .ordenproceso.value

if !found()
 append blank
  insert into llamadas(ordenproceso, telefono, sucursal, oficina, usuario, fllamada, undhard, modelo, dispositivo, hardware, ingeniero, grupo, detalle, viaticos, tiquetes, mobra, repuestos, taxisextra, taxislocal, host, bacceso, busuar, servicio, reporta, piso, origen, ubicacion,fechas_asg_ing) values (.ordenproceso.value,.standardfield1.value,;
  			  .ofisucursal1.value, .oficina1.value, .usuario1.value,;
  			  .fllamada1.value, .host1.value, .modelos1.value,;
  			  .dispositivo1.value, .host1.value, .ingeniero1.value,;
  			  .grupo1.value, .detalle1.value, 0, 0, 0, 0, 0, 0,;
  			  .host1.value, datetime(), m.vusuar, .subunidad1.value,;
  			  .reporta1.value, .standardfield2.value, .llaorigen.value,;
  			  .nombre12.value, .txtasging.value)
  TABLEUPDATE()
 else
   tablerevert()
   if !eof()
    skip+1
    .refresh
   endif  
endif  

  .ordenproceso.enabled=.f.
  .fllamada1.enabled=.f.
  .llaorigen.enabled=.f.
  .host1.enabled=.f.
  .standardfield1.enabled=.f.
  .subunidad1.enabled=.f.
  .detalle1.enabled=.f.
  .ingeniero1.enabled=.f.
  .reporta1.enabled=.f.

  .grpbotones.cmdTop.enabled=.t.
  .grpbotones.cmdPrevious.enabled=.t.
  .grpbotones.cmdNext.enabled=.t.
  .grpbotones.cmdBottom.enabled=.t.
  .grpbotones.cmdLocate.enabled=.t.
  .grpbotones.cmdPrint.enabled=.t.
  .grpbotones.cmdNew.enabled=.t.
  .grpbotones.cmdEdit.enabled=.t.
  .grpbotones.cmdDelete.enabled=.t.
  .grpbotones.cmdExit.enabled=.t.
  .grpbotones.cmdsave.top=121
  .grpbotones.cmdsave.left=62
  .grpbotones.cmdundo.top=147
  .grpbotones.cmdundo.left=62
endwith
The second problem i have is:
I've two forms "A" and "B" you push a button and the "B" form appears and in this you need to made reference to the form "A". The name of the form "A" frmCalls and this is my code in the form "B":
select llamadas
set order to ordenproc
ticket=thisform.text1.value
go top
seek ticket
if found()
  frmCalls.ordenproceso.value=ticket
  frmCalls.refresh
 else
   =messagebox("The ticket doesn't exists")
endif
thisform.release
Please i need help.
Thanks
Next
Reply
Map
View

Click here to load this message in the networking platform