If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
edit function in a table
I have a form that lists employee accomplishments. I have to update these
all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#2
|
|||
|
|||
edit function in a table
I expect there should be some code that you need to share. What code opens
the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#3
|
|||
|
|||
edit function in a table
Hi Duane,
Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#4
|
|||
|
|||
edit function in a table
Try to go to the design view, find the code, copy it, and paste it into a
reply. You could try creating a button in the detail section that would open the form to display the current record. There is a wizard that should do all of this for you. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#5
|
|||
|
|||
edit function in a table
Hi Duane,
I hope this is what you wanted. The only code i can find is this: Option Compare Database Private Sub Edit_Click() DoCmd.OpenForm "Accomplishments", , , "Accomplishmentid = " & Me.AccomplishmentID End Sub Is there somewhere else I should look? Thanks! "Duane Hookom" wrote: Try to go to the design view, find the code, copy it, and paste it into a reply. You could try creating a button in the detail section that would open the form to display the current record. There is a wizard that should do all of this for you. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#6
|
|||
|
|||
edit function in a table
That is the correct code and should open the form named "Accomplishments"
with a filter of AccomplishmentID equal to the AccomplishmentID of form/subform where the code is running. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, I hope this is what you wanted. The only code i can find is this: Option Compare Database Private Sub Edit_Click() DoCmd.OpenForm "Accomplishments", , , "Accomplishmentid = " & Me.AccomplishmentID End Sub Is there somewhere else I should look? Thanks! "Duane Hookom" wrote: Try to go to the design view, find the code, copy it, and paste it into a reply. You could try creating a button in the detail section that would open the form to display the current record. There is a wizard that should do all of this for you. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#7
|
|||
|
|||
edit function in a table
Hmmm... any thoughts on why the code is not working? Is there another
setting that may be off? Thanks! "Duane Hookom" wrote: That is the correct code and should open the form named "Accomplishments" with a filter of AccomplishmentID equal to the AccomplishmentID of form/subform where the code is running. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, I hope this is what you wanted. The only code i can find is this: Option Compare Database Private Sub Edit_Click() DoCmd.OpenForm "Accomplishments", , , "Accomplishmentid = " & Me.AccomplishmentID End Sub Is there somewhere else I should look? Thanks! "Duane Hookom" wrote: Try to go to the design view, find the code, copy it, and paste it into a reply. You could try creating a button in the detail section that would open the form to display the current record. There is a wizard that should do all of this for you. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#8
|
|||
|
|||
edit function in a table
I would place a BreakPoint in the code to see what is happening. You could
then make sure the code is running and the values. You could also change your code to: Private Sub Edit_Click() Dim strWhere as String strWhere = ""Accomplishmentid = " & Me.AccomplishmentID MsgBox "strWhe " & strWhere DoCmd.OpenForm "Accomplishments", , , strWhere End Sub -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hmmm... any thoughts on why the code is not working? Is there another setting that may be off? Thanks! "Duane Hookom" wrote: That is the correct code and should open the form named "Accomplishments" with a filter of AccomplishmentID equal to the AccomplishmentID of form/subform where the code is running. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, I hope this is what you wanted. The only code i can find is this: Option Compare Database Private Sub Edit_Click() DoCmd.OpenForm "Accomplishments", , , "Accomplishmentid = " & Me.AccomplishmentID End Sub Is there somewhere else I should look? Thanks! "Duane Hookom" wrote: Try to go to the design view, find the code, copy it, and paste it into a reply. You could try creating a button in the detail section that would open the form to display the current record. There is a wizard that should do all of this for you. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#9
|
|||
|
|||
edit function in a table
Hi Duane,
I don't know how to place a BreakPoint... sorry! I did try running the code that you suggested, but it gave me a syntax error when I tried to run it. Any other suggestions? Thanks a lot for the investment of your time! "Duane Hookom" wrote: I would place a BreakPoint in the code to see what is happening. You could then make sure the code is running and the values. You could also change your code to: Private Sub Edit_Click() Dim strWhere as String strWhere = ""Accomplishmentid = " & Me.AccomplishmentID MsgBox "strWhe " & strWhere DoCmd.OpenForm "Accomplishments", , , strWhere End Sub -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hmmm... any thoughts on why the code is not working? Is there another setting that may be off? Thanks! "Duane Hookom" wrote: That is the correct code and should open the form named "Accomplishments" with a filter of AccomplishmentID equal to the AccomplishmentID of form/subform where the code is running. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, I hope this is what you wanted. The only code i can find is this: Option Compare Database Private Sub Edit_Click() DoCmd.OpenForm "Accomplishments", , , "Accomplishmentid = " & Me.AccomplishmentID End Sub Is there somewhere else I should look? Thanks! "Duane Hookom" wrote: Try to go to the design view, find the code, copy it, and paste it into a reply. You could try creating a button in the detail section that would open the form to display the current record. There is a wizard that should do all of this for you. -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: Hi Duane, Yes, I think it has to do with VBA code, but I know nothing about Visual Basic, so I can't answer your first question. If I click somewhere else in the record before clicking edit, the same thing happens: it pulls up a blank form and it's record 1 of 1. I can click the filter button, and then it'll take me to the other 350 records so I can search through them, but it doesn't filter correctly so that the right record opens. I have compared the VBA code for the edit function with another database on which the function works, but they seem to be the same. Again, I don't know Visual Basic, so I probably don't know what I'm talking about. Any suggestions? Thanks! "Duane Hookom" wrote: I expect there should be some code that you need to share. What code opens the form? What happens if you click anywhere in the record prior to clicking the Edit? -- Duane Hookom Microsoft Access MVP "neuromoe" wrote: I have a form that lists employee accomplishments. I have to update these all the time. The form has a table in it, and one of the columns in the table is called "Edit." It used to be that if I needed to change an entry, I could click on the "edit" column, and it would open another form that allows me to see the full texts of each entry, pulling up the specific entry that I wanted to edit. Now, when I click on the "edit" column, it just brings up the first form in the database, and I have to go find the record that I want to edit. I'm not sure what happened. I recently moved this database to a secure location, so that content could be permanently enabled, so maybe I broke a link somehow. Can anyone help me get the "Edit" column to link to these specific records again? Thanks! |
#10
|
|||
|
|||
edit function in a table
On Wed, 8 Oct 2008 12:33:01 -0700, neuromoe
wrote: I don't know how to place a BreakPoint... Open the VBA editor and mouseclick in the vertical grey bar to the left of the code window. Click next to the line at which you want the code to stop - it must be an executable statement (i.e. not a Dim or a comment). -- John W. Vinson [MVP] |
|
Thread Tools | |
Display Modes | |
|
|