Modules & VBA :: Fetch Initials (First And Last Letter) Of Username

Dec 24, 2013

How can we store the first and last letter of the username using vba.

E.g. my name is "Daniel Rawlings" then it should display "DR".

View Replies


ADVERTISEMENT

Modules & VBA :: Fetch Combobox Text In Email Body Of Outlook?

Apr 25, 2015

I am trying to fetch combobox dropdown text (in the networks label ) into the email body but in vain.

Whichever networks are selected in the six dropdowns should go to email body as you can find in the attachment ...

View 1 Replies View Related

Modules & VBA :: Use The Environ Username Somewhere In The Db?

Mar 27, 2014

Using Win 7 and Access 2007

db will be split and on a server

If it's possible: Would like to use the Environ username somewhere in the db so the user only sees their records.
Where would I place this? Or is their different code I should be using for this purpose???

View 5 Replies View Related

Modules & VBA :: Validate Username And Password In A Button?

Jan 20, 2014

I would like to ask how can i validate the username and password in a textbox? I have a frmLogin and frmMain.

I have also a table called 'tblUsers' with column fields 'username and password'.

If username is not found in database then a msgbox will prompt 'Username is not yet created'.

If username is okay and password is incorrect then msgbox will prompt 'Incorrect password'

If username and password is okay, then a msgbox will prompt 'Successfully login' and will continue to frmMain.

View 3 Replies View Related

Modules & VBA :: How To Record Username In History Comments

Nov 26, 2013

I have a field that records comments call house comments i wonder is it possible to record which user leaves what comment?

Code:
=ColumnHistory([RecordSource],"Comments","[ID]=" & Nz([txtID],0))

View 1 Replies View Related

Modules & VBA :: Environ Username Function - Comparing Results

Apr 8, 2014

I am trying to use the Environ Username function, which i have working! But i want to compare the result with a Username Table to determine if they have access etc...

View 13 Replies View Related

Modules & VBA :: DLookup - Check Value Of Yes / No Checkbox Based On Username

Dec 22, 2014

I'm trying to find a code that will allow me to check a value of a yes/no checkbox based on a username.

What I want to happpen is:

1. The code looks to see if the username that is entered in "txtUsername" field on the form matches the "empUsername" value on the table "tblUsers."
2. If there is a match, I want it to look at the value for the field "Admin" on "tblUsers" to see if the value is checked as true.
3. If the value is true, I want it to open a specific form "frmAdmin." If it is false, I want it to open a form "frmMain."

VBA codes not recognizing the Admin field and instead taking all users into the frmMain.

View 3 Replies View Related

Storing The First Letter Of First Name, First Letter Of Last Name And Data Of Birth

Feb 19, 2006

Hi,

I'm designing a database in which the primary key is a combination of the first letter of first name, the first letter of last name and the date of birth.

How can I do that?

Regards,
CS

View 8 Replies View Related

Modules & VBA :: Creating Events Log - Compare Username On Report To Table

May 22, 2015

I'm working on creating an events log. In my table I've got a field that pulls the individual's username (that they use to log into the computer) and logs it against their log entry.

As part of my query (for my daily events log report) I'm pulling up said username.

I'd like to give access to the specific user to edit his (and only his) entries from the report, but I'm getting a type mismatch with the below code:

Code:
If me.UsernameID = "KraussLJ" Or Environ$("Username") Then
DoCmd.OpenForm "frmShiftLog"
DoCmd.FindRecord Me.ID, acStart, , acSearchAll, , acAll
Else
MsgBox ("You are not authorized to edit this entry")
End If

(before you ask, "KraussLJ" is our ops manager who insists on having final editorial control over the shift log before sending it higher up the chain)

I can get the msgbox to run if I block out the

Code : Environ$("Username")

, but beyond that I'm a little stuck. Should this be a dlookup function or am I overanalyzing this way too much?

View 2 Replies View Related

Modules & VBA :: Use Only First Letter From A Word

Feb 27, 2015

I'm creating a folder with values from some fields. It all goes OK, but, the only thing is that the name of the folder could get to long.

We use words like "Prototype Model" "Prototype Review" Next Date Review" "Next Prototype Review"

How could I end up with only the first letter from each word like "PM" "PR" "NDR" "NPR" from a field called Type_Review ?

View 14 Replies View Related

Modules & VBA :: Getting A Drive Letter?

Aug 19, 2014

I have an MS Access database that sits in the users local area e.g. C:Users....

I have the following code which will open a user guide on a server shared by all users.

Code:
strFilename = GetUNCPath("T:") & "19_InformaticsInternal Offer Transfers" & "Utility User Guide.doc"

Users have different drive letters for the server name. In my case it's "T:" but for others it may be"S:".

Is there any code which would determine what drive letter each user has? The server name is

denasvf1acorpHR_GLOBAL_1HR_Shared_Service_Data

View 3 Replies View Related

Modules & VBA :: Appropriate Watermark On Each Letter Of Printspool

Nov 29, 2013

I am using Excel as a frontend and Access as a backend. Now in the main form the user types in all the information about a customer and press Save. Suppose he stores 10 customers details so I am using PrintSpool Number . For those 10 records the printspool number will be save so that when the user press Print button then all those 10 Word document letters will get printed off. This works absolutely fine. Now I want to do the following checks in the code while printing:

It will make it easier on the watermark issue as it changes the below

First check
IF AXAFRIENDS = FLC use NO WATERMARK and END conditional (do not do second or third check)
IF FALSE move to second check

Second check
IF Team = LTC use LTC and END conditional (do not do third check)
IF Team = WINTERTHUR use WLUKCAP4 and END conditional (do not do third check)
IF FALSE move to third check

Third check
IF AXAFRIENDS = FRIENDS use PAP107 and END conditionals
IF AXAFRIENDS = DM use PAPSLD and END conditionals

AXAFRIENDS is the name of the field and the above conditions will result in different watermarks for each customer letter. My code doesn't work as required. Suppose 10 records in Access table have same PrintSpool number (Textbox1) ,then it should check for each record the AXAFRIENDS field value and display appropriate watermark during PRINT.

Code:
Private Sub CommandButton3_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim r As Long
Set cn = New ADODB.Connection

[Code] .....

View 4 Replies View Related

Modules & VBA :: How To Determine FlashDrive Letter

Apr 27, 2015

Is there anyway to determine the drive letter of a flashdrive inserted into a PC ? I have a backup routine that backs up a MS Access database to a flashdrive. I need to determine the flashdrive letter.

View 9 Replies View Related

Modules & VBA :: Creating Mail Merge Letter

Aug 20, 2013

I basically have a form which the record source is either from a table or query and all I would like to do is to have a button which when pressed will open up a previously created word template and insert all relevant fields into the template. First Name, Last Name, Address etc.

View 1 Replies View Related

Modules & VBA :: Insert Date If Letter T Is Pressed

Jul 17, 2015

On a form I have a textbox with a data type of Date/Time. If the user has the cursor in that text box and types the letter "t", I want to automatically insert today's date. I also want them to have the option of manually typing in a date, i.e. 05/12/2001 or use the Date Picker "calendar" item. This is using Access 2010.

View 3 Replies View Related

Letter By Letter Search Through A Table

Aug 21, 2005

ok here is what i want.. imagine a search box, just an empty text box that allows the user to type things into it...

there will be a simple table from the database behind it, here is the typical structure of a record

<Country>Poland
<Price1>60
<Price2>85
<Price3>95

in this table there will be say a 1000 of these records...
my user is going to have to quickly search through these records while on the phone to a customer, and quote one of the relevant prices associated with that country

what i would like is this most convenient system..
as the user types in the letter 'P' just below all the records with countries that begin with 'P' are displayed (with a scroll down arrow if needed)..as well as the 3 relevant prices with that record

if they then type an 'O' into the box (which will now hold 'Po') all the records with countries beginin with 'Po' will be displayed (eg Poland)

if they delete the 'o'. once again the displayed records below the box will return to just the countries begginin with 'p'

all that is needed is for the records to be displayed, thats it.. but the adding and deleting of the letters within the text search box will need to instantly manipulate this list..

i have posted on other forums, and have been told this can be acheived in access, is it hard?

View 9 Replies View Related

Modules & VBA :: Text Box Searches With Every Added Letter To String

Sep 16, 2014

I'm trying to add a search function the searches with ever letter I add to the string in the search box. if the string is not in the recordset then vbred the textbox.

Here's my code:

Private Sub txtGroupNr_KeyPress(KeyAscii As Integer)
Set RstRecSet = Nothing
Set db = CurrentDb
On Error Resume Next
If IsNull(txtGroupNr) Or txtGroupNr = "" Then
' MsgBox "Please enter a Group Number to use as the search criteria", _

[Code] ....

View 4 Replies View Related

Modules & VBA :: DLookup To Return A Value Starting With Specific Letter

Feb 25, 2014

I am trying to use a DLookup to search to find what block goes into the production of an item.

In a table called "dbo_vw_MCE_job_with_materials", each item contains a list of the parts which go into its production in a column titled "Expr1". However there are always more than one parts to this, with varying names.

What I am trying to do is to use a Dlookup to only return the first value which starts with B (as the block number is always the only part on the list which begins with B).

At the moment my DLookup would look ike this:

Code:
MixTypeTxt = DLookup("Expr1", "dbo_vw_MCE_job_with_materials", "[item] ='" & Forms![Theta Input]![ItemNumbertxt] & "'")

However I think as the item column contains the same item number in 8 columns, with different values in the Expr1 column, Dlookup only returns the top value "A-CF0057" (which is irrelevant as far as I am concered) - whereas I am hoping it will be able to pull the "B1499" value from the column as it is the only one starting with a B

Is there anyway to specify which value the dlookup function would return, or is there any way to apply some sort of permanent filter on my table?

View 1 Replies View Related

Separate Name Fields To Initials

Aug 13, 2007

Hi all, I'm trying to splitt the name of the clients in my query into a column called Initials:

Their 'Names' are in this format

SMITH,JOHN
JONES,PETER

Therefore in Initials, i want to see in column Initials

JS
PJ

How do i do this please? Many thanks

View 2 Replies View Related

Queries :: Concatenate Person Name And Initials

Aug 21, 2013

How to concatenate a number of fields from a table into a query.

The fields are:

Prefix
Firstname
MiddleInitial
MiddleInitial2
MiddleInitial3
Surname

Note that there will be varying combinations: some people will have a Prefix, Firstname then surname (no middle initials), so I would want to display "Mr Joe Bloggs". But others could have no Prefix but two middle initials, so "Joe P J Bloggs".

View 2 Replies View Related

How To Fetch Database Col Name?

Oct 24, 2004

Dear Friends,
I have a query
I want to fetch all the database column name in a table in MS access 2000. Pls can anyone help

View 1 Replies View Related

Forms :: Can Automate Adding Date / Initials To Memo

Apr 28, 2014

We have a memo field that folks may add to on different days. Additionally, different users may add notes if the person who started to work on the transaction is out of the office. My manager would like to add a way to include the date and initials of the person that added a new memo automatically after they add a memo. Currently, we don't track user login so I'm assuming we would have to in order to get their initials.

View 3 Replies View Related

Forms :: Displaying Initials In Combo Box When Option Selected From Drop Down

Oct 2, 2013

I have a Combo Box bound which gets its values from a table (T_Users).

The Combo Box displays the Users 'Initials' [Column 1], but the Bound Column [Column 2] is that of the Users 'ID' (which is used when a record is edited or a new record added).

What I want to be able to do is when the user clicks the Combo Box, and the drop down list 'drops down' the options, I want them to not only see the 'Initials' but also selected other columns - BUT - when the option is selected I just want the 'Initials' to be displayed in the Combo Box.

Code:
So, Normal > | ABC |

Dropped Down > | ABC |
--------------------------------------------
| ABC (Annabel Carcus, Big Company Ltd.) |
| JB (Joe Bloggs, Medium Company Ltd.) |
| FS (Fred Smith, Little Company Ltd.) |

Select JB, and > | JB |

View 6 Replies View Related

User Login And Have Their INITIALS Auto-Filled When Filling Out Forms

Apr 17, 2013

I have a database where multiple users log in and work in 1 of 2 different forms. The 1st form in for initial data entry where users enter data then senter there initials and save each record. the other form is for QC'ing data that has been entered and they will add additional data to the form, then enter their initials and save the record.

How can I make it so that I can have a user once they log in to the database, it will autofill their initials? I have used a dropdown box before but it is not useful for people who have the same first name initial or worst, the same first and second initial because they end up selecting the wrong initials.

I do not currently have it set up where I have a login screen, I just have only forms visible to users when they enter data. Any easiest way to go about making this happen (I am just trying to shorten the amount of data entry that gets done).

View 9 Replies View Related

Using DLOOKUP To Fetch Data From Table

Oct 28, 2013

I am facing issue with DLOOKUP,

Actually the program flow is like i have a table of 25 fields, ID as PK and item name, item code and remaining is the date as field name,

Below mentioned is the Table headings,

"ID" "Item Name" "Item Code" "10/29/2013" "11/5/2013" "11/12/2013"

Problem is that when im doing dlookup on date getting wrong result...

This is what I am using in my codes.

DLookup("11/12/2013" , "tbl_Name", "ID = " & rs.Fields("TRANSID") & "")

View 4 Replies View Related

Forms :: Using Combo Box To Fetch Information On A Form

Aug 13, 2013

I have a form that is used for data entry; from there I want to create a new form where I can select a field from a combo box which would generate the amount associated.

Example on the first form it has a Carpenter that has a calculated output of $1000, on the second form I would want to click on the combo box and pick carpenter and I would like the calculated field to be shown next to it.

I tried making an if statement on an unbound box but I found it difficult

=IIf([Combo2]=Building Service Engineer, =[Forms]![Estimate]![Text787],IIf([Combo2]=Carpenter,
=[Forms]![Estimate]![Text788],IIf([Combo2]=Custodian,
=[Forms]![Estimate]![Text789],IIf([Combo2]=Custodian - Shift Pay (5am - 6am) ,
=[Forms]![Estimate]![Text790],IIf([Combo2]=Drafting Technician,

[Code] ......

[Text787]-[Text805] are fields from the first form, these are calculated fields that multiplies wages quantity etc.

Also [Combo2] wont let me pick any data that I typed in.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved