Modules & VBA :: Automated / Transparent Conversion In Text Box Control
Jun 10, 2014
I have a text box control in a form that is bound to a table field. The field is of numeric format that stores time duration in minutes. I would like to apply sort of transparent / automated conversion. It would work so follows:
- when someone read records, the text box would convert a integer number stored in the filed into text so that the text box would show the time duration in this form "HH:MM"
- when someone clicks on the text box to change the value, one would input the value in this form again "HH:MM" but the text would be converted to minutes and then stored in the database.
View Replies
ADVERTISEMENT
Jan 27, 2006
Customers who are using Acess 2003 seem to have what I call a goofy display of Tab Controls on forms. At a specific PC you can create a tab control on a form and set the properties to Transparent but the tab stays white while the form is another color. When I take control of the application through a VPN connection and view this specific form over the internet the tab appears transparent and the form color is visible in the tab control.
When I use my own PC running Win XP to create a form in Access 2003, the tab control on the form is transparent. When I then copy the mdb that stores this form onto my customer's machine, or import the form to an mdb on the customer machine the tab control is white even though the property is set to transparent. When I copy the mdb from my customer's PC with the misbehaving form and tab control to my PC and view the form, the tab control appears transparent. :confused:
Is there a setting on the actual screen display that is causing this problem or am I missing another property on the form and/or tab control? This working on some but not all PC's is annoying. :mad:
Thanks in advance!
View 2 Replies
View Related
Aug 31, 2006
I have some tab controls, which for some reason show up white.
I have set their back style to transparent but it doesn't seem to show the grey Windows colour of the background form.
Any ideas why ?
AT the moment I'm having to put grey rectangles in various places to cover this up, which is obviously not ideal.
View 4 Replies
View Related
Sep 12, 2013
I have some vba that dump an access table into a recordset and then into an excel spreadsheet. When the data is exported Columns I:Q (which are numbers) appear as text (with the green triangle in the upper left corner). I have a pivot table that refreshed however it can't do anything with text.
I've tried just to change the cells format and it doesn't work. The only way I've been able to change it to a number is to click on the green triangle and select "Convert to Number" How can I do this via VBA? The # of rows will change but the columns will always stay the same.
View 2 Replies
View Related
Jun 22, 2005
Hello, I have been learning how to use Ms Access in order to design my own Database, I have done quiet a bit but i found myself kind of stuck witth the following issue. My question is pretty simple (I think…) Please, can someone help me? :o
I need a field that update itself automatically for each record.
For example, if I have 2 initial fields called [Stock balance] and [Quantity delivered]; I need to find a way to have the [Stock balance] updating itself just by entering a value for [Quantity delivered] where [Stock balance (actual record)] = [Stock balance (previous record)] – [Quantity delivered]
I could create a third field Called [Quantity left]
with [Quantity left (actual record)] = [Stock balance (previous record)]
and [Stock balance] = [Quantity left]-[Quantity delivered]
but it doesn’t seem right to create a third field that is equal to an other field just with one record difference.
Anyone with an advice?
View 4 Replies
View Related
Aug 9, 2014
I'm using Access 2010
What I want to be able to do is to assign a back colour to a control from VBA. There are many colours and what I thought would be an easy process was to choose a suitable colour to be assigned using the colour picker for a control, note the hex number then in my vba code would be
if... then me.mycontrol.backcolor=&HF0AD34
This compiles OK, but produces a completely different colour - I'm expecting an orange colour but getting blue and in another example a pale blue is coming out a brown.
Research indicates adding an ampersand to the end changes the value from integer to long but if I type
if... then me.mycontrol.backcolor=&HF0AD34&
The second ampersand disappears. In the immediate window
?&HF0AD34
?&HF0AD34&
?Val("&HF0AD34")
?clng("&HF0AD34")
?Val("&HF0AD34&")
?clng("&HF0AD34&")
All produce the same value of 15772980, which if I copy back to the control backcolour property produces the blue colour and not the required orange - which if i debug.print me.mycontrol.backcolor give me 3452400 - the correct number for orange.
The problem seems to be converting the hex number to a long.
Also how to modify the properties window to show the decimal value rather than the hex value, but can't see anywhere to do this.
View 14 Replies
View Related
Feb 2, 2014
I have two queries called "Query_match_AND" and "Query_match_OR". I want to show the total number of records for either of these queries in a form called "form_candidates_result" depending upon the combo box value (either "AND" or "OR") in a form called "form_match".If I put
Code:
=DCount("*","Query_match_AND")
in the control source of [candidatecount] in "form_candidates_result", the value is shown in the form and it works fine.If I use the following code in either of the "on load" or "on open" events in "form_candidates_result"...
Code:
Select Case [Forms]![form_match]![ANDOR]
Case "AND"
Me.CandidateCount.ControlSource = DCount("*", "Query_matching_AND")
Case "OR"
Me.CandidateCount.ControlSource = DCount("*", "Query_matching_OR")
End Select
it doesn't work and I get
Code:
#NAME?
View 7 Replies
View Related
Jun 3, 2015
I am having a few issues with my module code in Access 2002. for some reason every time I write some code Access is automatically making the first letter a capital so for instance [Our Ref] should be [Our ref] but it simply will not let me do it!
Temp = rstHTML!html1 & rstProp![Our Ref] & rstHTML!html2 & rstProp![Our Ref] & rstHTML!html3 & rstProp![Property Title]
View 6 Replies
View Related
Oct 6, 2006
I have a text string in the following format "00:09:10". Is there a function I could use that would convert it to HH:MM:SS?
I have been asked to calculate an average of time spent on a certain task and it is stored as text. Does anyone have suggestions on how this could be accomplished?
View 3 Replies
View Related
Mar 7, 2014
Is it possible, within an OnOpen even of a specific report, to set the printer selection and page setup (size, margins, etc.) to certain things? If so, how would I go about accomplishing this?
I would like to do this for specific users within our domain (this I won't have any trouble with).
View 9 Replies
View Related
Aug 11, 2015
I am the junior of the ms access.
I try to convert the below text to date
(03/08/2015 19:42)
(31/07/2015 12:20)
CDate([XXXX])
return 3/8/2015 7:42:00 PM (should be 03Aug2015)
return 7/31/2015 12:20:00 PM (should be 31Jul2015)
View 4 Replies
View Related
Jan 22, 2008
Hi all,
I would very much appreciate help with this one. So thanks in advance if anyone can help.
I have a table which has a Text Field (it has to be, I'm afraid). The data is listed as follows:
5.6%
12.23%
2.45%
etc.
I need to use these values to multiply other figures in queries. I have tried FORMAT and various other ways in the query to convert the data, but to no avail. All I get as a result is an ERROR. Anyone got any ideas?
Ginny
View 6 Replies
View Related
Mar 1, 2013
I have a date value in text format that is 5 character and want to convert it to a proper date format. Here is a sample of the data:
07301 actually represents 7/30/2011. How to actually convert that value to the date format of mm/dd/yyyy?
View 7 Replies
View Related
Jul 7, 2005
hello once again,
I need to import a text file into an existing table in Access. The text file has been imported once and is working well and everything. However, since I had to change some of the datatypes to be able to query the table correctly, I now cannot import the text file anymore unless I change the datatype of the table itself. Since someone other than I will be doing the imports from here on out, changing the datatypes everytime is out of the question. I was looking at the TransferText event, but I didn't seem to see anything about converting data types. I can think of two options, and neither are probably possible:
1. import using the wizard. Since I didn't see anything related to the types of data, I don't think this will work...
2.import using TransferText. This doesn't seem to give me any opportunity to change the datatypes either. Is there anyway to programmatically change datatypes, or is there possibly an easier way that I'm overlooking??
thanks in advance,
*j
View 4 Replies
View Related
Jun 11, 2015
I'm having trouble converting text to proper text in Access 2010 using Windows 8.1 as OS.
The message I keep getting is:
The expression you entered contains invalid syntax. You omitted an operand or operator, you entered an invalid character or comma, or you entered text without surrounding it in quotation marks.
The formula I use is:
strconv([field],3)
View 7 Replies
View Related
Jun 15, 2014
I have an old Table with Movies, Actress, Actor, & Director Fields & I have converted it to .accdb. I want to turn those short text fields to an ID number. I have built Tables for those fields(indexed no dups) with an ID field. I have over 5000 records in the original table and dont want to input those numbers by hand. I am using Access 2013.
View 5 Replies
View Related
Dec 4, 2014
I am building an access database to manage a data conversion from multiple legacy systems (62) to a new non access database, and plan on making my Conversion Database reusable and functionally simpler.All data is imported to one common Table structure, with the source system identified against each record.In my legacy systems values are not coded the same ie
Title: Mr Miss Ms Mrs Record Type: Active, Inactive
System A: 1, 2, 3, 4 a , i
System B: a, b, c, d 1 , 2
System C: x, y, z, w ACT, ,INA
This applies to sooo many fields.I want to avoid having a mapping table for each field as I will quickly have an unmanageable number of mapping tables, and complex relationships in Queries..I would like to get to the point where I could have a single value mapping table something as follows
System, Field, Old Value, New Value
System A, title, 1 Mr
System A, title, 2 Miss
System A, title, 3 Ms
System A, title, 4 Mrs
System B, title, a Mr
System B, title, b Miss
System B, title, c Ms
System B, title, d Mrs
And some how call this in VB to go through all fields and records in a table if Old Value is found for a specific "System" and "Field" Change to new value, if noting found on Mapping table keep existing data.
View 3 Replies
View Related
May 29, 2005
Is there any way of converting MS Access Forms(And module behind) to Visual Studio.Net?
I have a pretty comprehensive MS Access DB that has several complex forms. I want to redo this DB App in Visual Studio.Net but don't want to recreate the forms from scratch if there is any way of converting/importing or any shortcuts/tricks to accomplish this.
Thanks in advance for any help!
Mitch
Side note: Anyone ever added credit card billing capabilities to their db? Where to start? (I know.... Post in another thread....)
View 1 Replies
View Related
May 1, 2013
Does the background color on subforms can be changed to transparent?I have a form which contains 4 subforms. The main form has a picture that likes up with the 4 subforms, but when i go to make the sub form background color transparent it is greyed out.
View 5 Replies
View Related
Jul 17, 2013
I have a report, and the "reason" field is one that can grow as needed. The following string is in the field: "MISSING IMPLEMENTATION PLAN, MISSING SERVICE LOGS FOR DATE OF SERVICE". I bolded MISSING, where the space hits the border. My standard setting for the border style is Transparent, and the space is causing the growing to not work properly. TransparentBorder.pdf shows the incorrect growing. When I change the border style to Solid, the growing works correctly, as shown in the SolidBorder.pdf file.why the growing is not working properly with the Transparent border, but does work correctly with the Solid border?
View 3 Replies
View Related
Jun 11, 2013
Here's my Goal: To open a saved query that has a parameter, setting that parameter via a VBA sub.
Here's my Problem: I was getting various errors, but after debugging my program a bit, it comes down to a "Data Type Conversion Error"
Here's my Code:
Set db = CurrentDb
Set qd = db.QueryDefs("qryMY_DATA")
qd.Parameters(0) = Me.txt_ReferenceID
Set rs = qd.OpenRecordset("qryMY_DATA", dbDynaset)
Code:
'*** Database Variables
Dim db As DAO.Database, rs As DAO.Recordset, gq As DAO.QueryDef, prm As DAO.Recordset
I've been all over the forums and tried several different approaches, all to no avail. The Query runs fine in the QDT, but kicks back an error when I try to run it from my sub.
View 10 Replies
View Related
Feb 13, 2014
I have two table
1. dbo.period (OpeningDate, ClosingDate)
2. dbo.data (blah blah, doc_date)
I want to create a view as follows
Select doc_date from dbo.data
where doc_date> 'select OpeningDate from dbo.period'
both doc_date and opening date have the same format
but the error will still appear as follows:
"Conversion failed when converting date and / or time from character string."
View 3 Replies
View Related
Apr 15, 2014
I'm trying to pull a date from a table into a text box on a form tab control using DLookup and I just can't figure out what is wrong with my DLookup expression:
=DLookUp("DateOrdered","tDateOrdered","PrNumber=" & [PrNumber]) ----- (DateOrdered is short date, PrNumber is text, db is split Access 2013)
Whats missing in this expression? I've tried every criteria variant I could find but to no avail.
View 9 Replies
View Related
Aug 3, 2015
I have an automated email system (Lotus Notes) in a Access database I have created and am looking for the code needed to add up to 3 c.c addresses into an email prior to sending automatically.
The code I have to send the email to the To: individual is all working but what code I need to add and where for the c.c addresses of which there could be 1, 2 or 3. The control for To address is EmailTo = CustCopyEmail The controls for the 3 c.c emails are cc_EmailAddress, cc_EmailAddress1 and cc_EmailAddress2.
Here's the code I have:
Private Sub SEND_CC_Click()
' Set up the objects required for Automation into Lotus Notes.
Dim Maildb As Object 'The mail database.
Dim Session As Object 'The Lotus Notes session.
Dim MailDoc As Object 'The mail document itself.
Dim UserName As String 'The current users Lotus Notes name.
[code]....
View 8 Replies
View Related
Nov 1, 2005
I am using the following code to display the text already typed in a field in a continuous form (see below).
Private Sub Specific_Matter_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Specific_Matter.ControlTipText = Nz(Me.Specific_Matter.Value, "")
End Sub
I need to change the background color to light green instead of the yellowish background, and also have the pop up box text wrap when a text is too long. Is there a way of doing this?
Thanks.
View 1 Replies
View Related
May 11, 2006
Hi all,
My problem seems to be on such a basic level, but I can't for the life of me work out why it won't work!!
I have creatd a complex for which is a menu page for various reports. I have tried to put information on the control tip text to inform the user certain details.
I have entered this in the properties of the label on the form. but, when the form is back in form view, nothig happens when the icon is placed over the label.
Please if any one can help I will be very grateful!!!!!
Cheers
Ros
View 5 Replies
View Related