There is a standard company form currently in Word format (could use a different technology) with fields.
How do I extract the data into my Access DB from this fields?.
I am also open to advice of which technology would suit my requirements better with the requirements being:
- Need document to be sent to customers and add the filled information into database
- Be able to retrieve information from database and represent it in the form
Best How To :
Translate that form into Excel. Use "Collect Data" under the "External Data" tab on the ribbon to collect data from customers. To pull data onto your spreadsheet from Access do something like this. Use an Excel spreadsheet for the form. Then make a command button with the following event on click:
'"cmdbtn1" is the name you assign your command button.
Private Sub cmdbtn1_Click()
Dim appExcel As Excel.Application
Dim wbook As Excel.Workbook
Dim wsheet As Excel.Worksheet
Set appExcel = New Excel.Application
appExcel.Visible = True
Set wbook = appExcel.Workbooks.Open("C:\PathToYourDocument\YourSpreadsheet.xlsx")
'"YourSpreadsheet" is the name of the actual sheet in your workbook.
Set wsheet = wbook.Worksheets("YourSpreadsheet")
With wsheet
'The numbers next to ".Cells(" correspond to locations on your spreadsheet. A1=(1, 1), B1=(1,2), A2=(2, 1)
.Cells(10, 1).Value = txtThing1
.Cells(10, 2).Value = txtThing2
'This is how you combine multiple cell in excel into one Access field.
.Cells(10, 3).Value = txtThing3 + " " + txtThing4 + " " + txtThing5 + " " + Thing5
End With
End Sub