Selasa, 28 Maret 2017

Re: [MS_AccessPros] String will not appear in a label

 

John,
Welcome to the idiot squad, I had the wrong field name. it Should have [FinalInvoice]: Working code:
   Me.lblTotalinvoiceOrders.Caption = "Total # of Invoice Orders: " & DCount("OrderID", "tblOrders", "[FinalInvoice] = True")

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Anyone who claimed that old age had brought them patience was either lying or senile."  







From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>
Sent: Tuesday, March 28, 2017 12:21 AM
Subject: Re: [MS_AccessPros] String will not appear in a label

 
Art-

Don't put quotes around the word True.

John Viescas, author
Effective SQL
SQL Queries for Mere Mortals
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Access Applications

On Mar 28, 2017, at 00:21, Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

John,
That worked perfect, thank you.

I getting a syntax error when I run a dcount with a yes/no criteria...

 Me.lblTotalinvoiceOrders.Caption = "Total # of Invoice Orders: " & DCount("OrderID", "tblOrders", "[Invoiced] = 'True'")

What am I doing wrong??? 

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Anyone who claimed that old age had brought them patience was either lying or senile."  







From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>
Sent: Monday, March 27, 2017 3:14 PM
Subject: Re: [MS_AccessPros] String will not appear in a label

 
Art-

If you want to display just the first name, do this:

Me.lblLoginName.Caption = "Hello " & Mid(gstrThisEmpName, Instr(gstrThisEmpName, ",") +2) 

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Mar 27, 2017, at 10:38 PM, Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



John,

After I submitted this the darn thing started working I have it declared in a modGlobals modual is declared as global. Anyway for whatever reason its working. What concating the string just to bring back any after the comma? 

With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Anyone who claimed that old age had brought them patience was either lying or senile."   







From: "John Viescas JohnV@msn.com [MS_Access_Professionals]" <MS_Access_Professionals@yahoogroups.com>
To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com> 
Sent: Monday, March 27, 2017 12:32 PM
Subject: Re: [MS_AccessPros] String will not appear in a label

Art-

Where is gstrThisEmpName defined, and is it defined as Public or Global?  The fact that you're getting nothing except "Hello" tells me the variable isn't set or isn't Public or isn't in the public domain or hasn't been set yet when you set the Caption property.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Mar 27, 2017, at 7:56 PM, dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:




I have a variable which is gloablly defined as gstrThisEmpName as String. It is assigned a vale during the login process:
gstrThisEmpName = Me.cmbUserID.Column(1) which will assigne the name value as Doe, Jane.

WHen I pass this value to the next form in the the Form_Load statement:

  Me.lblLoginName.Caption = "Hello " + [gstrThisEmpName] the only thing that appears is the word Hello. I have tried it like   Me.lblLoginName.Caption = "Hello " & [gstrThisEmpName] and it does the same thing. 

Also I would like to concatenate the   [gstrThisEmpName] string to reflect just the first time basically all the characters after the comma. Any ideas?

Thank you,

Art Lorenzini
Sioux Falls, SD.












__._,_.___

Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar