Good Morning,

I have a dialog used to display and enter information from a table. I have been using an array initialized from table.

I have run into a snag. I am unable to open my dialog if there is not already a record matching my filter and like I mention I use this dialog not only for viewing but entering records into the table.

When I made the dialog I already had entered records into the table so this was over looked. Now that we have new accounts to enter we have run into this problem.

What follows is whats sets the array for the dialog. I need to be able to set the variables to a null value if no record exists and allow the dialog to open.

tbl = a5.Get_Path()+chr(92)+"job description.dbf"
dim rec[25] as p
dim i as n
i = 1
rec.initialize_from_table(tbl,"Customer_Id=VAR->plvdid", "" )

dim global vtype as C
dim global vjobid as C
dim vfrequency as C
dim vjobcomments as C
dim vcharge as N
dim vIntial_Charge as N
dim vpricingcomments as C
dim vjobtime as C

vtype = rec[i].Job
vFrequency = rec[i].Frequency
vIntial_Charge = rec[i].Intial_Charge
vCharge = rec[i].Charge
vJobComments = rec[i].JobComments
vjobtime = rec[i].Jobtime
vjobid = rec[i].Job_Id
vPricingcomments = rec[i].Pricingcomments

If someone could send me in the right direction i would be thankful