home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / db3v / demo1.frm (.txt) < prev    next >
Visual Basic Form  |  1993-10-03  |  10KB  |  221 lines

  1. Form1
  2. Customer Information
  3. Form1
  4. Label10
  5. Account Number:
  6. AccountNumber
  7. Label1
  8. Last Name:
  9. LastName
  10. Label2
  11. First Name:
  12.     FirstName
  13. Label3
  14. MiddleInitial
  15. Label4
  16. Address:
  17. Address
  18. Label5
  19. City:
  20. Label6
  21. State:
  22. State
  23. Label7
  24. Label8
  25. Telephone:
  26. Phone
  27. Customer
  28. DBENGINE
  29. Label9
  30. Notes:
  31. Notes
  32.     TopButton
  33. NextButton
  34. InsertButton
  35. Insert
  36. DeleteButton
  37. Delete
  38. BottomButton
  39. Bottom
  40. PreviousButton
  41. Previous
  42. UpdateButton
  43. Update
  44. ClearButton
  45. Clear
  46. MNU_File
  47. &File
  48. MNU_Create
  49. &Create Customer Database
  50. MNU_Quit
  51. &Quit
  52. Form_Click
  53. @    Form_Load
  54. AddressBookE
  55. Action
  56.     OpenTable
  57.     GetRecord
  58. FillForm
  59. Form_Unload
  60. Cancel
  61. CloseTable
  62.     FieldName
  63. GetField
  64. LastName
  65. FieldValue
  66.     FirstName@
  67. TopButton_Click
  68. FirstRecord
  69. InsertButton_Click
  70. PutField
  71. InsertRecord
  72. ClearButton_Click
  73. MiddleInitial
  74. UpdateButton_Click@
  75. UpdateRecord4
  76. @    InsertRec
  77. @    UpdateRec
  78. Address
  79. State^
  80. Phone
  81. Notesv
  82. BottomButton_Click^
  83. LastRecord
  84. NextButton_Click
  85. NextRecord
  86. PreviousButton_Click
  87. PreviousRecord
  88. DeleteButton_Click
  89. DeleteRecord
  90. MNU_Quit_Click|
  91. DTBL_Error
  92. Reaction
  93. LastName_Change
  94. LastName_LostFocus
  95. MNU_SearchFirst_Click
  96. MNU_SearchLast_Click
  97. CustomerQ
  98. AccountNumber3
  99.     TableName
  100. IndexID
  101. SaveEveryChange
  102. False
  103. DBENG_Error
  104. FormToRecord
  105. MNU_Create_Click
  106. NFields
  107. FieldNames
  108. FieldTypes
  109. CreateTable
  110. IndexNFields
  111. CreateIndex 
  112. TableFieldNames
  113. TableFieldTypes
  114.     TableType
  115.     Paradox40
  116. Form_Load
  117. C:\CUSTOMER"
  118. Form_Unload
  119. FillForm
  120. Here we wish to develop a subroutine that fills in our
  121. Address Book form with the information present in thee
  122. current record of our database
  123. Notice that this Subroutine is not position dependentt
  124. It always fills in the form with the information present
  125. in the current record.
  126. We will use other routines to move around in the databasee
  127. table. We can then call this routine to fill in our form..
  128. This routine is reusable!!
  129. Get the current record. 
  130. Account Number
  131. Last Name"
  132. First Name
  133. Middle Initial
  134. Address"
  135. State"
  136. Phone"
  137. Notes"
  138. TopButton_Click
  139. This code will make the current record the first recordd
  140. in the table.
  141. It will then fill our form with the data present in thee
  142. first record..
  143. ClearButton_Click
  144. Here we simply clear all the fields on the form.
  145. There are no database specific routines involved here.
  146. InsertButton_Click
  147. This subroutine inserts a record into our database.t
  148. Transfer info from form to current record.
  149. Insert the record 
  150. If an error 
  151. UpdateButton_Click
  152. This subroutine updates a record in our database.
  153. Transfer info from form to record 
  154. Update recordf
  155. if error
  156. InsertRec
  157. This subroutine inserts a record into our Address Book
  158. database. It takes information present on the form and
  159. INSERTS it into the database
  160. Account Number
  161. Last Name"
  162. First Name
  163. Middle Initial
  164. Address"
  165. State"
  166. Phone"
  167. Notes"
  168. UpdateRec
  169. This subroutine updates a record in our Address Book
  170. database. It takes information present on the form and
  171. UPDATES the current record in the database
  172. Account Number
  173. Last Name"
  174. First Name
  175. Middle Initial
  176. Address"
  177. State"
  178. Phone"
  179. Notes"
  180. BottomButton_Click
  181. NextButton_Click
  182. PreviousButton_Click
  183. DeleteButton_Click
  184. MNU_Quit_Click
  185. DBENG_Error
  186. Error code:"
  187. -Insufficient password rights!
  188. Error code:"
  189. -Invalid table!!
  190. Error code:"
  191. -End of table!
  192. Error code:"
  193. -Start of table!
  194. Error code:"
  195. -Unknown error!"
  196. FormToRecord
  197. This subroutine transfers the information present in the
  198. Customer Information form to the database's current record.n
  199. Account Number
  200. Target database field 
  201. Target field value
  202. Place it in the Accounte
  203. Number field in thei
  204. current record. 
  205. Do the same three-step process for each remaining field in the Customer
  206. Information form.-
  207. Last Name"
  208. First Name
  209. Middle Initial
  210. Address"
  211. State"
  212. Phone"
  213. Notes"
  214. MNU_Create_Click
  215. We will create the CUSTOMER table here in the root directory on drive CC
  216. C:\CUSTOMER"
  217. Account Number,Last Name,First Name,Middle Initial,Address,City,State,Zip,Phone,Notes"
  218. N,A30,A20,A1,A50,A30,A2,A10,A14,M200
  219. Now create the primary index
  220. C:\CUSTOMER"
  221.