Re: saving information into a tables



On Wed, 27 Dec 2006 20:54:01 -0800, GlobalTek
<GlobalTek@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Oh ok hehe Thanks for the info

Well I have a form that ask the user for Language selection ( french or
English )
Hide in that form his 3 Text Box, 1 will say the username of the person (
=fosusername() ) the second text box will say the machine name (
=fOSMachineName() ) and the last one will promt the date the form was open (
=now() ) I would like that info to be saved inside a table to know who is
accessing the file in case they is some problem. I tried the thing below and
It did not work, Anyone can tell me or help me resolving the problem please?

ok...

Open a recordset based on the Table and add a new record, setting its
fields to the desired values.

Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("YourLogTable", dbOpenDynaset, dbSeeChanges)
rs.AddNew
rs!Username = fosusername() ' or use the control name
rs!Machinename = fOSMachinename()
rs!WhenOpened = Now
rs.Update
rs.Close
Set rs = Nothing


John W. Vinson[MVP]
.



Relevant Pages

  • Further explanation...repost
    ... To accomodate this i have a form which the user clicks english or french. ... Dim Gefunden As Boolean ... Dim index As Integer ...
    (microsoft.public.access.reports)
  • Re: access 2003
    ... Dim ctl As Control ... Dim rs As Recordset ... This sets the query definitions for choosing data to create an invoice using ... Event on combo box: Private Sub ChooseCust_AfterUpdate ...
    (microsoft.public.access.conversion)
  • Re: Calculating Percentiles
    ... It seems that what you want then is not the percentile, ... If you want to call it repeatedly on the same recordset, ... Dim rsPercentile as DAO.Recordset ... ' Ascertain the quantile rank for a given score from the numeric ...
    (microsoft.public.access.modulesdaovba)
  • Re: A simple problem with MoveFirst
    ... update the table (rather than using the recordset) means that from ADO's ... Dim tbDataToBeEmailed As ADODB.Recordset ... tbDataToBeEmailed.Open "tbDataToBeEmailed", cnCurrent, adOpenKeyset, ... "You have not entered time into the ACIS ...
    (microsoft.public.access.modulesdaovba)
  • Re: macro error due to editor
    ... Your VBA code never sets DB or the Recordset variables to Nothing. ... Do you declare DB as a global variable anywhere in the database file (e.g., ... EmpDateAs String ... Dim DB As Database, Qry As QueryDef, Qry_def As String ...
    (microsoft.public.access.macros)