Forms :: Using Textbox To Change Position And Length In Mid Function
Aug 6, 2015
I have a .csv file where I need to parse out the information.
I have imported the .csv file into access and all the data is in [Field1]
Instead of using query design, I want to create a user interface [Form] where anyone can input in the textbox the position and length of a mid function.
Example:
Last name: Position = 1 Length =15
First Name: Position = 15 Length = 30
Is it possible for users to input the numbers in texboxes to extract the data to another table?
I am currently working on a form. I used textbox to set the value of currency and sumif to total nett price for all of data with that specified currency.
How can I get the value of the textbox?
I use formula :
=Sum(IIf([Currency]="USD",[NettPrice],0))
And it's worked. It sums up all net price with USD currency
However, the currency types are so many and it's impossible for me to list them down one by one, so I use this formula :
I have a report, in which i have a unbound text box i want to control the size of the text box as actual characters means,
if the word is in box is elephant so in report it show complete word then next and if the word is small like cat then it resize then the other word next to cat comes automatically at normal space by auto resizing of text box ..
I want to change column position as following order: Company, Start Month, Mar-05 , Apr-05, Fees ABC_________Mar-05____1_______2_____7 ABC_________Apr-05____________4 _____5
I tried to use this code:
Dim db As DAO.Database Dim rs As DAO.Recordset Dim qd As QueryDef
Set db = CurrentDb Set qd = db.QueryDefs("report_crosstab")
qd.fields("Fees").OrdinalPosition = 4
It doesn't work for crosstab query.
Can anybody tell me how to change the column position of the query?
I would like to put a text box (user) and checkbox (check100) on a form, that when the checkbox is not checked the value in Gender switches. In an AfterUpdate I would use a code to capture the user login.
Code: Private Sub Check100_AfterUpdate() Me.User = Environ("UserName") If Me.check100 = 0 AND Me.Gender.Value = "Male" THEN Me.Gender.Value = "Female" ElseIf Me.check100 = 0 AND Me.Gender.Value = "Female" Then Me.Gender.Value = "male" End If End Sub
I am developing a form whereby the user types a single character or a sequence of characters into textbox and a query WHERE clause is compiled upon each character being entered.
The query is the Row Source of a listbox which I requery upon each change in the text box contents.
In the Change event I cannot access the new contents of the textbox until focus moves to another control and then back to the textbox. This is not how I expect this event to work.
In my table (tbl_data) I have a field named Rating. This can be anything from 1 - 10.
On my form (frm_input) I have a textbox (created using the wizard so at the moment I'll call it txt_Rating).
What I would like to know how to do is:
If the value in the textbox is 0-5 leave the background colour of the textbox white with black font. If the value in the textbox is 6-7 turn the background colour pale yellow with black font. If the value in the textbox is greater than 7.1 turn the background colour Red with white font.
I am using a DLookup to default a value in my TextBox. This text box has an event attached to it that updates a table when a different value is entered.
I am having difficulty in getting the default value to reappear when I change my criteria.
For instance Manufacturer is Ford
Colour is default Black
I Change the colour to red
now I change Manufacturer to Audi
I need Default colour to go back to Black
The Lookup Table says Black its just that the default value only seems to run once, first time in and never again unless i exit the database and reopen it.
I have tried adding
Form.Repaint form.Refresh Form.Requery to my afterupdate query
Is there an alternative to using the mailto function that will still open up outlook?
The problem right now is that the body length is too long, so the traditional string = "mailto:joeshmoe@blah.com?subject=test" will NOT work when attaching a message body that is over I think 220 characters or something.
I need to be able to still open up outlook with an extra long message body. Is this possible? Thanks.
I have a form with two textboxes that get their values from two different queries that counts records from table. If textbox1.value equals texbox2.value the textbox2.value back ground colour is green. If they are not equal textbox2.value goes red. Itried with using conditional formatting, but it doesn't work all the time as the form is not updating when it is opened.
I have a new staff member in my office that has informed me that she has a degree of dyslexia. To assist her I've trialled changing the textboxes on one form in my Access 2013 application to a light pink color & this has instantly worked for her to read/input text.
Is there a way to automatically change each textbox to light pink on every form in my application on startup based on user login (say using an IIF statement in the OnLoad event of the startup form).
I have a table with about 300,000 records. About ten fairly small fields per record. I am trying to change the length of a text field from 25 to 40 characters, and I get the error message, 'MS Access can't change the data type. There isn't enough disk space or memory'.
I have never seen this message before. I have about 64 Gig of free disk space. What can I do?
how to make my form controls change size / position as my form is resized / loaded on a computer with a different resolution. Several of the tutorials out there suggest putting code on the "on resize" property of the form. When I looked at the Northwind database to try to mimic their code however, it looks like they must be doing something different as there is no on resize code under the form properties and I was unable to find the code they do use.
I have a subform which holds data in a datasheet mode. when i delete a record i close the parent form and then reopen it because i am not having luck making the requery work. the user wants the position to be at the location the form was before deletion although it will be a different record. I have tried
and it gives me a error saying that the frmVendorList is not open. That is the form that is the subform the line before i open the parent form. The name for the subform in the property sheet is frmVendorList.
I have a form that i have created with various tabs along the top, e.g. customer details, customer contact etc etc.I have a subform on one of the tabs.
That subform also has tabs on it.When clicking on the main form tab it goes to subform but the scroll bar moves down only to show the subform tab options. I have to keep scrolling back up to see the main form tab options.
Can anyone help me out here. I need to use an unbound text control to return me a value if a field is populated else "Local" if the field is not populated. Can anyone tell me if this is possible and show me the syntax if it is. Help appreciated. Andy
I would like to display message box in access VBA if the user forget to change the text box value after clicking the submit button. Example: 1 card contains 9 rows when they input the 7th row message box should come out "please remember to Change the card Number"
I have a form in datasheet view, with the record ID column frozen and users typically scroll to the right to see certain columns. Different users scroll to a different position.
I dont have the option to reduce the number of columns or create separate forms for different users, - they all need to see all the columns but typically a user scrolls horizontally to see a certain set of columns most of the time. I want to save that position for the next time they open the form.
Is it possible to make a control have a fixed position so that when the form is vertically scrolled the object stays in the same position?
I have a continuous form that shows records based on criteria that the user puts into an earlier form. There is a close button on the page but you cannot see the close button if you horizontally scroll too far along the page. You have to horizontally scroll because of the amount of fields that are on the form.
Is it possible to define the position of a navigation button. For example, I want my first navigation button not starting totally on the left but a bit indented. Possible?
Secondly, suppose I have combo boxes on my first navigation button and for each combo box and choose a value, next I move to the second navigation and then back to the first navigation button. Then it always seems that the values of my combo boxed are reset to default value. Can this be avoided?
Hello fellow programmers, I have a tricky one for you. We have decided to split our local City up into different zones. Giving each zone a number and assigning it a colour. I have a form with all the customers who want jobs done in different parts of the city. This form has a text box on it called: Zone - (which has a 3 digit number it it). I want the colour of the text box to change depending on the Zone number, in the continuous Form view. So all the customers living in Zone=111, will have a Red background colour (color), all living in Zone=222 will have a Green background colour. I know conditional formatting through the properties of the Form can be used, but it only allows me to select 3 different situations. I have many more than 3 colours that I want to assign. I am working on a VB module to define what colour numbers from the MS Access Colour Map will be assigned to each Zone number. How can I now apply this module to the form, so when it opens, all the customers who live in Zone=111 will have a Red coloured background, those living in Zone=222 will have a green colour background, etc?
I've created several Split forms that have the data input fields in the form with the relevant query datasheet shown below. As you tab through the form fields, the various cells in the datasheet are highlighted and move across the data row (as one would expect!). I want to put a particular field / Column at the start of the datasheet so that it's always available for view, but it seeme that what ever I do the column ends up back at the very far end of the data row!
I've sussed out the "Freeze Fields" facility which will keep the first column visable whichever cell is highlighted across the data row.
The column I want as the first column currently sits at the far end of the data row. So far I have dragged the row to the first column position; I've arranged the Query driving the form so that the column is at the front of the row, both in design view and in datasheet view, but to no avail. Everything I do to put the column at the start of the row in the datasheet shown below the form ends up with it back at the far end of the row the next time I open the form.
On main form cursor working is goods as per default. But after come to in Subform its shown the cursor position in the last filed. So every new record is shown as the same last field. How to do this cursor position will be change in subform as per default?? and every new record its need to show as per default TabIndex "0".
I have checked my Tab Index & Order Settings also it is good. But its shown as last filed in subform