Click here to Skip to main content
15,897,718 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have an inquiry form that accepts various fields of inputs from the user. most inquiries have similar fields as the previous set of data entered. So i would like to have a duplicate button to populate the form with previous set of data , using the form number (to be auto generated). Just so that user doesn't have to type the same details all over again.

i have used unbound forms and a table to store details of every inquiry.

What I have tried:

Private Sub b_previous_Click()
'open Previous form
Dim new_ticket As Integer
new_ticket = ticket_num - 1

If Not Me.b_next Then

DoCmd.OpenForm "F_inquiry_new ,ticket_num & Me.new_ticket & "


End If
End Sub


PS. i dont know how to auto generate the form number when a new form is opened,yet. For now i physically input my ticket number in the form.
Posted
Updated 7-Oct-16 7:38am
Comments
Maciej Los 4-Aug-16 8:16am    
I don't get you... Can you be more specific and provide more details?
At this moment i understand that you want to type inquiry number to be able to get its details. Next, you want to use that data to create new inquiry. Am i right?

1 solution

You could always leave the form populated when they submit the form.
Add another button that clears the form and submits, or just clears the form.

And you can also add something like:
Private Sub TextBox1_GotFocus()
TextBox1.SelStart = 0
TextBox1.SelLength = Len(TextBox1)
End Sub

To you textboxes so that it selects all the text when clicked and then they can just overwrite the text in the boxes they want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900