Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alias directory

Status
Not open for further replies.

reinaldo

Programmer
Mar 29, 2001
31
0
0
US
The following code work great, the QTRTAXES table which is in the working directory has an additional number added to the "Code" field. I recently copied the QTRTAXES table to a directory called :SU2003: and created an alias called SU2003. I want to be able to use the same method and add the additional number to the "Code" field of the QTRTAXES table in the SU2003 directory. As the code is now it adds the additional number to the QTRTAXES table on the working directory. What can I add to the code so that the additional number gets added to the QTRTAXES table in the SU2003 directory.


method pushButton(var eventInfo Event)
var
QTRTAXESNum Number
QTRTAXEStbl Table
endVar

Code.Moveto()

QTRTAXES.Action(Databeginedit)
QTRTAXES.Action(DataEnd)
QTRTAXES.Action(FieldDown)
QTRTAXES.Action(DataInsertRecord)

Code.ReadOnly=False

QTRTAXEStbl.Attach("QTRTAXES.DB")
QTRTAXESnum = QTRTAXEStbl.cmax("Code")+1
Code.Value = QTRTAXESNum
Action(FieldRight)

Code.ReadOnly=True

endmethod
 
Is the new table to be part of the form's data model? If so, then open the form in design mode but use the "Change Table" button on the open dialog box. Select the new table from there before opening the form. Then save the design.

Other than that, the only other change is:
QTRTAXEStbl.Attach(":SU2003:QTRTAXES.DB")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top