Visual FoxPro to VB

  • Thread starter That Crazy Hockey Dood
  • Start date
T

That Crazy Hockey Dood

I am working on the conversion of Visual FoxPro designed forms and processes
into Access 2003. Unfortunately, I am not sure how to make the code used in
FoxPro work in VB.

Here is what happens in FoxPro. A user enters a beginning & an end date on
the "entry" form. The form then writes the entries to the table for all of
the dates that fall in the range. For example: Beginning Date: 6/2/2007
Through Date: 6/10/2007
The data is written to the table for 6/2, 6/3, 6/4, etc.

Here is the code as written in FoxPro for this function:
public diff, count
m.thrudate=m.thrudate+1
diff =(m.thrudate-m.date)
m.day=1
FOR count=1 to diff
select except
Set Order to id
Set Deleted Off
Go bottom
m.id=except.id+1
Set Deleted On
m.lock=RLOCK()
IF m.lock=.t.
INSERT INTO except
(id,type,ssn,name,realtime,date,excused,fmla,note,time,type,initial);
VALUES
(m.id,m.type,m.ssn,m.name,m.realtime,m.date,m.excused,m.fmla,m.note,m.time,m.type,m.initial)
IF m.day=1
=messagebox("First multiple day record was entered",0,"Record Entered")
ELSE
=messagebox("Next multiple day record was entered",0,"Record Entered")
ENDIF
UNLOCK
ELSE
=messagebox("Record was not entered, please try again",0,"Please try again")
ENDIF
****Insert into except from memvar
m.date=m.date+1
m.day=m.day+1
ENDFOR

My hope is that someone out there has already run into this before and it
will be a quick fix.

Thanks,
Jim
 
S

Steve Sanford

If you really feel you must aks a question in more than one group, please
Cross-post instead of multi-posting.

Please check your post in microsoft.public.access.modulesdaovba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top