How do I get the width of a text box?

I have an auto updating textbox that varies in width and I’m trying to get the line below it to resize with the text box. This is as far as I’ve gotten.

Private Sub Command870_Click() Dim lineW As Double lineW = Auto_Title0.Width lineTitle.Width = lineW End Sub 

So for some reason and I can’t figure out where the number comes from so it must be converted to another unit of measurement that I don’t know of but instead of inches it turns out to always be the same number no matter how many times I click the button.

4350 but the Width is 3.0208″.

Anyone know a way to get that value converted to inches or whatever that unit of measurement used when changing the line’s width?

Edit:

I know this is a bit messy but I’m still working on some borrowed code and my own so it hasn’t even gotten cleaned up yet.

Private Sub Command870_Click() Dim name As String Dim fontSize As Integer Dim intChars As Integer Dim intTwips As Integer Dim titleWidth As Double Dim autoTitle As Double Dim lineWidth As Double Dim totalWidth As Double name = Nz([First Name] & " " & [Last Name], "Untitled") fontSize = Auto_Title0.fontSize intChars = Len(name) ' how many chars in the label intTwips = 1440 ' might depend on what font you are using titleWidth = (intChars * fontSize) totalWidth = titleWidth Auto_Title0.Width = totalWidth lineTitle.Width = totalWidth autoTitle = Auto_Title0.Width lineWidth = lineTitle.Width Debug.Print "Name: "; name Debug.Print "Font Size: "; fontSize Debug.Print "Characters: "; intChars Debug.Print "Total Width: "; titleWidth End Sub 

Where I’m running into a dead end with this as I’m trying to get the text box to expand based on the number of characters in it and the font size I’m using. I am just not able to wrap my head around the formula to get this sorted out. I thought twips would help but there is always an overflow and the number it produces would be much too large anyways. In the debug print below

Name: FirstName LastName Font Size: 24 Characters: 18 Total Width: 432 

I’m not sure where I’m going wrong with my math here. I know I’m missing something but I really thought taking the number of characters and multiplying it by the font size would get me my width.

submitted by /u/TakeBeyond
[link] [comments]

Get the best Microsoft Access conultant

Get the best Microsoft Access programmer

Posted on

Question on Split Databases

I am using Microsoft Access to process attendance to automatically calculate wages of employees. Due to the large volume of attendance records every month, there are often mistakes in the input of data. Hence, it is crucial for my users to be able to edit the attendance from the table. However, I read that the front end of the database contains only the queries, forms, reports, macro, etc but the tables are stored in the back end. Hence, the question: will my users be able to view and edit the attendance records that they input from the front end database? If they are able, how do I make it so? Thank you!

TL;DR: Are front end users able to view and edit the records they had previously input?

submitted by /u/TheKnight119
[link] [comments]

Get the best Microsoft Access conultant

Get the best Microsoft Access programmer

Posted on

Issue with forms suddenly not appearing when opened in form view

This issue manifested seemingly out of nowhere. One minute the database was functioning fine, the next, forms (pop up, modal forms) weren’t displaying and resulted in me having to close and re-open the database as it would not let me exit out of form view. Since I can’t see the form, I can’t change the view and I just have to exit the database. Has anyone experienced this before? Any solutions? I combed through VBA and there doesn’t appear to be any code that might loop infinitely or cause the database to crash but I’m not 100. Is it possible that buttons with no assigned code could cause an issue? Is not putting code behind certain objects possibly the cause? Appreciate any insight. I’m still a bit of a novice when it comes to Access and code in general, so maybe I made a common mistake that I’m not catching or noticing. Cheers!

submitted by /u/CapRavOr
[link] [comments]

Posted on

Question on Split Databases

I am using Microsoft Access to process attendance to automatically calculate wages of employees. Due to the large volume of attendance records every month, there are often mistakes in the input of data. Hence, it is crucial for my users to be able to edit the attendance from the table. However, I read that the front end of the database contains only the queries, forms, reports, macro, etc but the tables are stored in the back end. Hence, the question: will my users be able to view and edit the attendance records that they input from the front end database? If they are able, how do I make it so? Thank you!

TL;DR: Are front end users able to view and edit the records they had previously input?

submitted by /u/TheKnight119
[link] [comments]

Get the best Microsoft Access conultant

Get the best Microsoft Access programmer

Posted on

Access Noob – Right Application?

I’m currently working with a lot of data in Excel (50k lines-ish) that feeds some presentations (6 presentations) that I have to go manually update the linked excel manually so that my file doesn’t grow too big to function well in Excel.

I was hoping to roll things into Access and streamline my process. Was wondering if this concept was possible, and for some pointers in the right direction.

I have two parts lists, these include Part Number, Next Assembly Number and quantity.

I have another sheet that has a plant number, and an assembly number. My third sheet has part numbers and PO numbers.

My hope is to construct a query that gives me a list of all parts that are assigned to a certain plant (so check the plant number list, get all next assemblys at a plant, and pull all of those parts).

The bonus would then be to add the PO number for each P/N to that query.

I could put together an example set of tables if that would help…but I am a little lost in if I can do this with Access.

submitted by /u/Confident_Drawer
[link] [comments]

Get the best Microsoft Access conultant

Get the best Microsoft Access programmer

Posted on

Customer Story: Drug Free Business

DSC_0915.jpg

DSC_0921.jpg

DSC_0927.jpg

Part of the Team

 

Meet Gertrude. Gertrude is the hardest worker at our client Drug Free Business. Day and night, Gertrude reads, understands, distributes, correlates, and communicates drug test information for hundreds of different organizations and partners. She works in every department, communicates promptly with every client, and understands the dozens of unique codes and measurements peculiar to each laboratory and regulatory body.  In fact, Gertrude’s boss says she does the work of a dozen other employees!

 

You’ve guessed by now that Gertrude is a software application.  At Gertrude’s core is a complex back-end SQL Server database, and its suite of automatic procedures and functions. A family of Access and .NET applications give her human assistants insight into the inner workings of her mind, and emailed notifications keep them up-to-date on what she’s thinking. Occasionally Gertrude will want her work checked—or she’ll run across lab result she doesn’t yet understand—but typically she’s content to work away, making sure data gets where it needs to go.

 

We like to think of Gertrude as a nurse with an attitude.

 

Origin Story

 

Drug Free Business (DFB) is a Bothell, WA-based non-profit dedicated to helping employers maintain a safe, drug-free environment.  Their tag line is “safety, savings and professional guidance”.  DFB offers an ambitious service to their clients: everything they need for a comprehensive drug-free workplace program. It’s a complex challenge. DFB handles everything from randomly selecting employees for drug testing, to providing pre-employment and post-accident screening. They need to know the rules for dozens of different regulatory agencies, and provide best practices for all of their clients.

 

As DFB grew since their founding in 1988, so too did the burden of managing all this information. Their network of collection facilities and laboratories expanded into the thousands, and their list of clients into the hundreds. Their homebuilt databases and spreadsheets weren’t keeping up with all this data, and they knew they couldn’t grow with what they had. They needed a new system that could take on the current workload, then scale up with the business.

 

Growing with the Business

 

Our team at J Street worked with the DFB’s leadership to design and develop the first phase of Gertrude in 2007.  DFB was already familiar with Access, and its lower development cost was compelling, so using Access for the front-end desktop applications was a natural choice.  Well over ten years later, DFB (led by Executive Director Venus Mills, C-SAPA) and my team at J Street are still working together to support and enhance Gertrude.  The system provides 24/7 client services via an ASP.NET web portal where DFB’s clients can log in and view test results and important documents directly.   Last year we improved how Gertrude generates invoices, taking a ton of workload off her human coworkers and dramatically reducing paper and postage.

 

DFB continues to grow, and Gertrude continues to support that growth, creating a positive feedback loop where DFB can directly see the benefits of investing in their system. Choosing a custom application gave them the flexibility to adapt to shifts in the industry, regulatory changes, and growing demand – while retaining industry leadership and a competitive advantage.  If, in 1988, you told the original DFB team where the business would be today, and the role played by a custom application named Gertrude, I’m not sure they’d have believed you.

 

About the Author

 

clipboard_image_0.png

Armen Stein leads a team of highly-experienced database and web application developers. His company, J Street Technology, builds custom database applications using Microsoft Access, SQL Server, ASP.net MVC and SQL Server Reporting Services (SSRS). They are also a Microsoft Partner, and offer Office 365 configuration, migration and consulting services. Armen has been a Microsoft Access MVP since 2006.

Posted on

"Failure to read from an internet handle. Try the operation again."

I have linked to a dynamics 365 database. Access pulls tables appropriately but when I create a query and try to run it, I receive the error in the title. I understand that access is no longer supported, is that the reason for the error, or is it something that I can fix? Any help would be appreciated.

submitted by /u/auglove
[link] [comments]

Get the best Microsoft Access conultant

Get the best Microsoft Access programmer

Posted on