![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrote in "=Now()". However, this doesn't seem to work. Any ideas why not? And any suggestions to get this to work? Thanks in advance. |
#3
| |||
| |||
|
|
Joe Smith wrote: I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrote in "=Now()". However, this doesn't seem to work. Any ideas why not? And any suggestions to get this to work? Thanks in advance. Me.Filter_Start = Now() |
#4
| |||
| |||
|
|
On Oct 27, 11:06 am, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrote in "=Now()". However, this doesn't seem to work. Any ideas why not? And any suggestions to get this to work? Thanks in advance. Me.Filter_Start = Now() I typed it in just like that but it doesn't work. |
#5
| |||
| |||
|
|
Joe Smith wrote: On Oct 27, 11:06 am, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrote in "=Now()". However, this doesn't seem to work. Any ideas why not? And any suggestions to get this to work? Thanks in advance. Me.Filter_Start = Now() I typed it in just like that but it doesn't work. Is Filter_Start both ControlSource and Name? * If unbound it would not need a control source. *What is the error number and message? |
#6
| |||
| |||
|
|
On Oct 27, 12:10 pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: On Oct 27, 11:06 am, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrote in "=Now()". However, this doesn't seem to work. Any ideas why not? And any suggestions to get this to work? Thanks in advance. Me.Filter_Start = Now() I typed it in just like that but it doesn't work. Is Filter_Start both ControlSource and Name? If unbound it would not need a control source. What is the error number and message? Yes, Filter_Start is both Control Source and Name. The error is "Microsoft Access can't find the object 'Me.'" |
#7
| |||
| |||
|
|
Joe Smith wrote: On Oct 27, 12:10 pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: On Oct 27, 11:06 am, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrote in "=Now()". However, this doesn't seem to work. Any ideas why not? And any suggestions to get this to work? Thanks in advance. Me.Filter_Start = Now() I typed it in just like that but it doesn't work. Is Filter_Start both ControlSource and Name? * If unbound it would not need a control source. *What is the error number and message? Yes, Filter_Start is both Control Source and Name. The error is "Microsoft Access can't find the object 'Me.'" There's the code behind the form and a code module under modules tab. If under Modules, there is no Me, behind the form there is. Create a new form in design view. *Open up the property sheet for the form, select Events, select any event, hit the ... on the right and select code. *Enter the word "Me." (no quotes). *You should get a dropdown from intellisense of available properties. Go back to the form in question. *If you don't get a intellisense dropdown when you enter Me. in your form, you have another error someplace else. *Compile it an find the other errors. In a worse case scenario you can enter * * * * Forms!YourFormName!Filter_Start = Now() instead of Me.- Hide quoted text - - Show quoted text - |
#8
| |||
| |||
|
|
On Oct 27, 12:42*pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: On Oct 27, 12:10 pm, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: On Oct 27, 11:06 am, Salad <sa... (AT) oilandvinegar (DOT) com> wrote: Joe Smith wrote: I've been trying to get a field (filter_start) on a form to populate the current date & time when that field is clicked on. I went under form design, and on the field's (filter_start) click event I wrotein "=Now()". However, this doesn't seem to work. Any ideas why not?And any suggestions to get this to work? Thanks in advance. Me.Filter_Start = Now() I typed it in just like that but it doesn't work. Is Filter_Start both ControlSource and Name? * If unbound it would not need a control source. *What is the error number and message? Yes, Filter_Start is both Control Source and Name. The error is "Microsoft Access can't find the object 'Me.'" There's the code behind the form and a code module under modules tab. If under Modules, there is no Me, behind the form there is. Create a new form in design view. *Open up the property sheet for the form, select Events, select any event, hit the ... on the right and select code. *Enter the word "Me." (no quotes). *You should get a dropdown from intellisense of available properties. Go back to the form in question. *If you don't get a intellisense dropdown when you enter Me. in your form, you have another error someplace else. *Compile it an find the other errors. In a worse case scenario you can enter * * * * Forms!YourFormName!Filter_Start = Now() instead of Me.- Hide quoted text - - Show quoted text - Thanks. I think you put me on the right track. I got a button that when clicked displays the current time into the Filter_Start field. However, it overwrites all records with the same time. Is there a way to differentiate between records. Below's the button's code. Do you know the correct syntax to make this happen: Filter_Start.PK, so that it differentiates each record. Private Sub Command12_Click() Me.Filter_Start = Time() End Sub- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |