Evening all,
I'm very new to VBA and am struggling badly with this one. I'll explain what I need to do as the title is a little unclear!
I'm making an insurance calculator for classic cars, and on my welcome screen I have a button called lablled Edit Existing Quote. What I would like this button to do is, upon clicking, ask the user to enter the Reg Number (the PK in my client data table) of the client whos details they wish to edit. Once a reg number is entered and submit or something has been clicked I want that record to then appear in form view.
I've got as far as the:
DoCmd.OpenForm "frm_New_Quote" , acNormal
(The form is named so because I use it to add new data as well, using the 'DoCmd.GoToReco rd , , acNewRec' code, the form otherwise shows client data for the last record entered.)
I'm guessing it'll involve vbQuestion somewhere in there, or possibly some SQl...I'm really not sure. I only have a very basic knowledge of VBA and the two lines I've pasted there are about all I know! I'm staring at my VBA book but failing to find the relevant pages.
So, can anyone help me out with this one? It should run like :
Click 'Edit' button on welcome screen, then little box pops up asking for reg number, then that clients details is presented.
Please help!
P.S
my client data table is called 'Client Tbl' at the moment.
I'm very new to VBA and am struggling badly with this one. I'll explain what I need to do as the title is a little unclear!
I'm making an insurance calculator for classic cars, and on my welcome screen I have a button called lablled Edit Existing Quote. What I would like this button to do is, upon clicking, ask the user to enter the Reg Number (the PK in my client data table) of the client whos details they wish to edit. Once a reg number is entered and submit or something has been clicked I want that record to then appear in form view.
I've got as far as the:
DoCmd.OpenForm "frm_New_Quote" , acNormal
(The form is named so because I use it to add new data as well, using the 'DoCmd.GoToReco rd , , acNewRec' code, the form otherwise shows client data for the last record entered.)
I'm guessing it'll involve vbQuestion somewhere in there, or possibly some SQl...I'm really not sure. I only have a very basic knowledge of VBA and the two lines I've pasted there are about all I know! I'm staring at my VBA book but failing to find the relevant pages.
So, can anyone help me out with this one? It should run like :
Click 'Edit' button on welcome screen, then little box pops up asking for reg number, then that clients details is presented.
Please help!
P.S
my client data table is called 'Client Tbl' at the moment.
Comment