I have a form with some data associated to TableData. The form contains one field with a Name string.
I want to associate a drawing to each name string to make things more clear for the user. The drawing is done on a sub-form by inputting letters in the many textboxes on the subform. All these textboxes are bound to fields of TableDrawing which contains the drawing data.
When a new record on the mainform is displayed, a sub makes a search for the name string and determines if a drawing is already associated with it. If so, the drawing is displayed on the subform, if not the user can input a drawing on the subform by clicking a button.
I am considering three ways to do that...any thoughts?
***THIS IS THE WAY I HAVE IT NOW****
Sub DrawOnSubForm_Click
Initialize
Get name string off of main form
Open RecordSet with TableDrawing data associated with subform
Does this drawing name already exist in the table?
If Yes then move to this record Else add a new record
Make textboxes in form opaque to let user draw
End sub
Sub SaveDrawing_Click
Make textboxes in form back to transparent
Update RecordSet
Close RecordSet
End Sub
Now I am unsure that I can open a recordset in one sub and close the recordset in another one.
**** THIS WAY SEEMS BETTER, BUT NOT SURE HOW TO DO IT*****
Sub DrawOnSubForm_Click
Initialize
Get name for drawing off of main form
Open RecordSet in table associated with subform
Does this drawing name already exist in the table?
If Yes then move to this record Else add a new record
Make textboxes in form opaque to let user draw
Pause to let user put data in text boxes (I have no clue how to do this????)
Make textboxes in form back to transparent
Update RecordSet
Close RecordSet
End Sub
**** I FEEL THERE MUST BE A WAY TO DO THIS WITHOUT BOTHERING WITH RECORDSETS*****
Sub DrawOnSubForm_Click
Initialize
Get name for drawing off of main form
Search the name string field in all records of the form to see if the drawing exists?
If Yes then move to this record Else add a new record to the form
Make textboxes in form opaque to let user draw
End Sub
Sub SaveDrawing_Click
Make textboxes in form back to transparent
'I think there is no need to update anything as the form will automatically update the table
End Sub
I want to associate a drawing to each name string to make things more clear for the user. The drawing is done on a sub-form by inputting letters in the many textboxes on the subform. All these textboxes are bound to fields of TableDrawing which contains the drawing data.
When a new record on the mainform is displayed, a sub makes a search for the name string and determines if a drawing is already associated with it. If so, the drawing is displayed on the subform, if not the user can input a drawing on the subform by clicking a button.
I am considering three ways to do that...any thoughts?
***THIS IS THE WAY I HAVE IT NOW****
Sub DrawOnSubForm_Click
Initialize
Get name string off of main form
Open RecordSet with TableDrawing data associated with subform
Does this drawing name already exist in the table?
If Yes then move to this record Else add a new record
Make textboxes in form opaque to let user draw
End sub
Sub SaveDrawing_Click
Make textboxes in form back to transparent
Update RecordSet
Close RecordSet
End Sub
Now I am unsure that I can open a recordset in one sub and close the recordset in another one.
**** THIS WAY SEEMS BETTER, BUT NOT SURE HOW TO DO IT*****
Sub DrawOnSubForm_Click
Initialize
Get name for drawing off of main form
Open RecordSet in table associated with subform
Does this drawing name already exist in the table?
If Yes then move to this record Else add a new record
Make textboxes in form opaque to let user draw
Pause to let user put data in text boxes (I have no clue how to do this????)
Make textboxes in form back to transparent
Update RecordSet
Close RecordSet
End Sub
**** I FEEL THERE MUST BE A WAY TO DO THIS WITHOUT BOTHERING WITH RECORDSETS*****
Sub DrawOnSubForm_Click
Initialize
Get name for drawing off of main form
Search the name string field in all records of the form to see if the drawing exists?
If Yes then move to this record Else add a new record to the form
Make textboxes in form opaque to let user draw
End Sub
Sub SaveDrawing_Click
Make textboxes in form back to transparent
'I think there is no need to update anything as the form will automatically update the table
End Sub
Last edited: