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
|
|||
|
|||
Tracking Visits by Members
Hi. I have a membership database that will now be used to track member
visits to our location. When the member's record is displayed, I'd like to have a button that I can click on which will add the time and date to their record each time they visit. I think I need a separate table to store this info. Any ideas? TIA John |
#2
|
|||
|
|||
Tracking Visits by Members
On Wed, 9 Jun 2004 14:40:34 -0700, "John R. Youngman"
wrote: Hi. I have a membership database that will now be used to track member visits to our location. When the member's record is displayed, I'd like to have a button that I can click on which will add the time and date to their record each time they visit. I think I need a separate table to store this info. Any ideas? You do indeed need a second table, with fields for the MemberID, and the date and time of the visit. You can set the Default property of this field to Now() if you'll be entering the data at the time of the visit; if you just display the visits table as a Subform of the member form, you can simply add a new record and it will record the time automatically. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
#3
|
|||
|
|||
Tracking Visits by Members
Thanks for your advise, John.
Is there a way to populate the fields in the second table by using a command button on the form? If I'm displaying the member record, I'd like to have a button the the user can click which will add an entry to the second table for the time and date. The entry will be done at the time of the visit, so the Now() part should work just fine. Thanks again. John "John Vinson" wrote in message ... On Wed, 9 Jun 2004 14:40:34 -0700, "John R. Youngman" wrote: Hi. I have a membership database that will now be used to track member visits to our location. When the member's record is displayed, I'd like to have a button that I can click on which will add the time and date to their record each time they visit. I think I need a separate table to store this info. Any ideas? You do indeed need a second table, with fields for the MemberID, and the date and time of the visit. You can set the Default property of this field to Now() if you'll be entering the data at the time of the visit; if you just display the visits table as a Subform of the member form, you can simply add a new record and it will record the time automatically. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
#4
|
|||
|
|||
Tracking Visits by Members
On Wed, 9 Jun 2004 20:01:35 -0700, "John R. Youngman"
wrote: Is there a way to populate the fields in the second table by using a command button on the form? If I'm displaying the member record, I'd like to have a button the the user can click which will add an entry to the second table for the time and date. The entry will be done at the time of the visit, so the Now() part should work just fine. Sure. The button could simply run a one-row Append query: Private Sub cmdVisit_Click() Dim strSQL As String strSQL = "INSERT INTO [Visits] (MemberID, VisitTime) Values (" _ & Me!MemberID & ", #" & Now() & "#") DoCmd.RunSQL strSQL End Sub John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
Thread Tools | |
Display Modes | |
|
|