>I am working on a database that was largely built by someone else, who is no longer with the company.
>
>I have built a new form, which I need to populate data from a table within the database, which are entered into the form frmreports. The new form is called frmvwrptnts. Both of these forms come from the form frmviewsite. The txtID is the primary index. The code for the button leading to frmreports is:
>
>
thisform.txtID.Refresh
>IF THISFORM.txtSite.ReadOnly = .f.
> MESSAGEBOX('You must save before viewing the reports form!',16,'WAIT!')
>ELSE
> IF thisform.txtID.Value < 10000
> STORE ALLTRIM(STR(thisform.txtID.Value,8,3)) TO m.reportid
> STORE ALLTRIM(thisform.txtSite.Value) TO m.reportsite
> ELSE
> STORE ALLTRIM(STR(thisform.txtID.Value)) TO m.reportid
> STORE ALLTRIM(thisform.txtSite.Value) TO m.reportsite
> ENDIF
> DO FORM frmreports.scx
>ENDIF
>
>
>
>Therefore, I similarly made the code for the frmvwrptnts as:
>
>
thisform.txtID.Refresh
>IF THISFORM.txtSite.ReadOnly = .f.
> MESSAGEBOX('You must save before viewing the reports form!',16,'WAIT!')
>ELSE
> IF thisform.txtID.Value < 10000
> STORE ALLTRIM(STR(thisform.txtID.Value,8,3)) TO m.notesid
> STORE ALLTRIM(thisform.txtSite.Value) TO m.notessite
> ELSE
> STORE ALLTRIM(STR(thisform.txtID.Value)) TO m.notesid
> STORE ALLTRIM(thisform.txtSite.Value) TO m.notessite
> ENDIF
> DO FORM frmviewrptnts.scx
>ENDIF
>
>
>
>In the grid, I have set the control source to reports.rptname, etc. (reports is the table where the data is stored). However, this does not populate any of the needed data for me. Obviously I am missing at least one step, but I am not sure of what it is. Hopefully this all made sense.
Grid.Refresh() ?
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.