Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / August 2006

Tip: Looking for answers? Try searching our database.

Adding a Username to a Transaction from a Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rillo - 30 Aug 2006 23:48 GMT
I have a continuous form called “Ledger Transactions to be deleted” that
displays one or more transactions for a given client.

The user can set a flag on a selected transaction to denote that the
transaction is to be marked for deletion.

I want the system to attach the name of the user to the transaction.

The username is a field on the transaction record and is on the “Ledger
Transactions to be deleted" form, but is not visible.

The username is recorded on a form called "Welcome Menu".

I assume I could use the Setvalue action to populate the username field on
Delete Transaction i.e. [Forms]![Ledger Transactions to be
deleted]![Username], [Forms]![Welcome Menu]![Username]

However, where should I put the Setvalue Action? I tried putting the
Setvalue Action
on the Gotfocus event on the Username field, but this does not seem to work.

Secondly I have a table called Username, which holds a single record
containing the username. This record is changed when the user enters his/her
name on the Welcome Menu.
I would prefer to add the username to the [Forms]![Ledger Transactions to be
deleted]![Username] field by accessing the Username table, rather than
leaving the Welcome Menu open. How could this be done?

Signature

Thanks in anticipation.

Arvin Meyer [MVP] - 31 Aug 2006 04:00 GMT
Instead of closing the Welcome Menu, just hide it by setting the form's
visible property to false. A command button can be labeled to close, but
actually just hide the form. Code would be something like:

Sub cmdClose_Click()
   Me.Visible = False
End Sub

Now you can simply refer to the textbox on the Welcome Menu:

Sub Form_AfterUpdate()
   Me.txtUserName = Forms![Welcome Menu]!txtUserName
End Sub
Signature

Arvin Meyer, MCP, MVP
Free MS-Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

>I have a continuous form called "Ledger Transactions to be deleted" that
> displays one or more transactions for a given client.
[quoted text clipped - 26 lines]
> deleted]![Username] field by accessing the Username table, rather than
> leaving the Welcome Menu open. How could this be done?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.