Updating A Text Box To Scroll
Jan 31, 2006
OK, this one is doing my head in!
I'm using aleb's most handy code from this thread (http://www.access-programmers.co.uk/forums/showthread.php?t=100636) to have a multi select list box that determines recipients of an e-mail from the list.
I thought it would be handy to have it make a list that updates at the same time, showing what e-mail addresses will be sent. Here's the code I used:
Private Sub lstMailTo_Click()
Dim varItem As Variant
Dim strList As String
Dim strElist As String
Me.cmdEmail.Enabled = True
With Me!lstMailTo
If .MultiSelect = 0 Then
Me!txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & ";"
strElist = strElist & .Column(0, varItem) & vbNewLine Next varItem
If strList = "" Then
Me!txtSelected = strList
Me.cmdEmail.Enabled = False
Me!txtEadd = ""
Else
strList = Left$(strList, Len(strList) - 1)
Me!txtSelected = strList
Me!txtEadd = strElist
End If
End If
End With
End Sub
The code works, but when the text box becomes filled, you cannot see the bottom of the list.
How can I set it to know this and automatically put a scroll bar in, so the addresses can be reviewed before hitting send?
I was interested to see if I could do something similar, but instead have a label display just the last item selected. I tried strElist = .Column(0, varItem) and setting the label caption to strElist, but this only displayed the first item selected. How would I do this?
Many thanks in advance for any assistance!
View Replies
ADVERTISEMENT
Nov 14, 2005
Hi,
Is it possible to use the mouse wheel go through a text box instead of using a vertical bar?
Thanks,
Le
View 1 Replies
View Related
Nov 26, 2004
Hi Guys,
I have a text box containing a lot of explanitory text and I want vertical scroll bars.
I have set the 'scroll bars / vertical' in the properties of the text box and yet...no scroll bars. I feel that some other setting is preventing the scroll bars.
Anyone got any ideas?
View 1 Replies
View Related
May 24, 2015
I have a textbox on continues form which contains multiple lines and I d like to set it up so it ll be scrolled down completely when it displays the form. I ve already found a few so called solutions but nothing worked for me.
View 5 Replies
View Related
Jul 7, 2014
Most my short text fields on my form are normal, but some have scroll buttons like a memo box and it's annoying, especially because the user can't jump to the next field by pressing return.
How do I make them normal?
View 10 Replies
View Related
Apr 25, 2013
I have a form and in the form is a subform. When I add a record with the following code, the subform detail scrolls in such a way that you can't see the record you just added...only a single blank new record. Can you set the scroll position so that I can see all the previous records including the one I just added?
Private Sub Add_PROJ_RECORD()
On Error GoTo Err_Add_Click
Me.PROJECT_DATA.Locked = False
Me!PROJECT_DATA.SetFocus
DoCmd.GoToRecord , , acNewRec
Me.PROJECT_DATA.Form.PROJ = PROJ_COMBO
Me.PROJECT_DATA.Form.SPEC = SPEC_COMBO
Exit Sub
View 2 Replies
View Related
Aug 2, 2006
Hi all,
I've looked through the previous posts here but can't find what I'm looking for (probably because I can't think of how to phrase it). Basically I've got a text box that allows for entry of the item cost, then a text box called Quantity and another text box that calculates the total cost based on the quantity. Fairly straightforward and works, well sort off anyway.
Basically the text box does not update as soon as the quantity amount has changed. You seem to have to either go out of the form or click on another field.
Any ideas? It's probably simple but it's been driving me nuts now for ages. Any help would be grately appreciated as always.
Cheers
View 1 Replies
View Related
Mar 2, 2005
Hi
I have a continuous sub form linked to a main form.
The fields on the subform are:
Quantity
Part Number
Description
Code
Price
I also have a total price field for each record the control source for this is
=[Quantity]*[Unit Price].
I then have a text field to calculate the order total in the form footer control source is
=Sum([Total Price]).
The problem that I have is if I change the quantity in record 1, the text field to calculate the order total does not update until I tab onto record 2.
Have searched far and wide for the answer and have tried all manner of me.[mytextboxname].requery to no avail - help!
Thanks
Georgina
View 5 Replies
View Related
Jun 10, 2005
Hi,
I am trying to take text from two different text boxes on a form and place into another text box on the form. I want it to also update the table with this new text.
Example: fname, lname, fullname are text boxes on a form. when user enters fname and lname, I want the two strings/text to be added together and placed in fullname while also updating the table with the fullname text.
Any ideas?
Thanks,
dbnewbie
View 8 Replies
View Related
Jul 7, 2006
I have similar text boxes on two different forms. On the first form when I add a value and click the add button it automatically submits that value to the second form. However, on the second form when I select a value and click add, it deletes the previous value given by the first form. I have written code that allows the user to input more than one value on the second form, which works fine.(The previous values do not get deleted) I want to write some code that allows the user to submit a value on the first form, and that value remains on the second form's text box even when the user adds more values on the second form. Also the values are inputted to a table.
One previous suggestions was to put field2=field1 & field 2. However this does not work.
Any suggestions would be a of great help. I am pretty new at Microsoft Access. Thanks for the help
View 1 Replies
View Related
Jun 26, 2014
I have a form where I type in the time a person starts a job. The format is Medium Time. I also have a box where I type in the End time for that job. Also formatted in Medium Time. I have another box that is for if a break happens during that job to return the value 10. My formula for that box is: =IIf([Start Time]<"9:00 AM" And [End Time]>"9:10 AM",10,0). The problem that I am having is that it only works when the time is in the 9:00 AM to 9:59 AM time frame. I need it to work where if a person starts at 6:00 AM and gets done at 2:30 PM to return the value of 10.
View 4 Replies
View Related
Mar 19, 2013
I am trying to create a login form with the following three basic fields:
txtUsername
cboUsertype
txtPassword
I would like to be able to populate cboUsertype with User types associated to the user I type into txtUsername. I have found many useful tutorial on the web on login procedures. How ever I hardly found anything on how to populate a combobox after updating a texfield. It bis more than a week that I am trying to find a solution but until now I have just been . I would be grateful if you could provide me with either a link on the web or a vb code to make it work.
View 3 Replies
View Related
Jun 18, 2013
Currently I have an issue where on of the fields in a userForm will not update. I have tracked down the problem to an update Event procedure
Code:
Private Sub txtRate_Change()
Me.txtSales = Me.txtRate * Me.txtPages
Me.txtGST = Me.txtSales * 0.1
Me.txtTotal_Inv = Me.txtSales + Me.txtGST
End Sub
The idea being, when you update the rate, the Sales/Revenue figure will update based on that rate. For a while this seemed to work fine. but recently , it just will not allow me to update the field txtRate, I cannot understand why. I have now replaced the _Change() event for a _LostFocus() event. but I am not sure that is as reliable, and I am still puzzled / worried as to why the _Change event will not work.I'm on Access 2013, win 7 , using a front end db connected to the back end using linked tables.
View 8 Replies
View Related
Mar 16, 2015
How to trigger the below VBA Code under one Change() Event once a selection is made from the only combobox on my form.
Code:
Private Sub cbxAssociate_Change()
Me.txtFIRJuly14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Jul-14'")
Me.txtFIRAugust14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Aug-14'")
Me.txtFIRSeptember14.Value = DAvg("FIR_Perc", "tblFIRStats", "[Associate]= '" & Nz([cbxAssociate]) & "'AND [Month] = 'Sep-14'")
[Code] .....
View 8 Replies
View Related
Mar 26, 2013
I have a form that contains a combo box (cboEmployeeName) that pulls data from a query and populates three text boxes (Work Area, Last Name, First Name), This part works fine. Because the text boxes are being populated by the Combo box, they are not bound to the record source tblTrainingSchedule). I need the info that is in the text boxes to populate the respective fields in the record source.
I tested by adding "=tblTrainingSchedule!WorkArea=[cboEmployeeName].Column(3)" (column 3 is the work area) to the "after update" control but it does not populate the data.
View 4 Replies
View Related
Mar 8, 2013
My database has a text field "Status" where the text is either, A, W, C. There is a form to update this field; currently it uses a standard Access created text field. The users want a checkbox which will show up as checked when the status is W, if the status is anything else, the checkbox will be blank. If the user clicks the checkbox within the form the status will be changed to W.
If [table.status] = 'W'
then checkbox = 0
else
checkbox = -1
and then somewhere on the update it would be
if checkbox = -1 then [table.status] = R
Except that Access doesn't think the way I do.
View 1 Replies
View Related
Dec 16, 2014
I have a form that has combo boxes and text fields (as well as sub forms). There is also a button linked to some code that says'
Private Sub cmdQuote_Click()
'Creates quote date and prints quote
Me.QuoteDate = Now()
Me.cbAgentID.Requery
DoCmd.OpenReport "Quote", acViewPreview, , "BookingID = " & Me.BookingID
End Sub
When the button is pressed the QuoteDate field (it is bound) should be be populated, but unfortunately it is not. I have played with refresh and requery but cannot derive a solution.
View 1 Replies
View Related
May 3, 2006
I have a subform on my main form that uses a query to display the information. On the query and subform there is a discussion field. I would like to put a scroll bar on this field so the user can scroll through the text since it could possibly be large but the scroll bar function does not work on this field. I have tried setting the scroll bar feature in properties for the sub form field but it will not put it on this field. Any ideas????
View 6 Replies
View Related
Feb 19, 2005
I have a text box and a list box in a form.
When the user types in something in the text-box i want the closest matching record (based on the first column) of the list box to be scrolled to.
For eg.
Text in Text box is Kan
Then the list box should scroll to records starting with Kan.
I am currently achieveing this using Sendkeys as i have rarely used list boxes but would prefer a cleaner method if possible.
View 4 Replies
View Related
May 13, 2005
The detail section of my (continuous) form may or may not have a scroll bar on the side depending on the number of records. When it is there, it is way off to the side and the user may not notice that there are more records to view. I'd like to add Up/Down buttons to the footer that become visible when the scroll bar is visible, and work like the Up/Down buttons on the scroll bar.
Can anyone suggest how I might code this?
Thanks,
Sup
View 3 Replies
View Related
Jun 23, 2005
Is it possible to change the colour of scroll bars in subForms?
Seems odd that you can easily customise all the colours, yet have to settle with a horrible looking grey scroll bar!
Any help or a 'work-a-around' to the problem would be welcomed.
Thanks
View 1 Replies
View Related
Nov 7, 2005
I'm trying to auto scroll the Detail Section where the user will able to see the last record on my continuous form.
Can anyone tell me how to do this?
My sincere thanks!
View 3 Replies
View Related
Nov 23, 2005
I'm a fairly new user of Access-self taught, working for a small company. I can't figure out how to insert a scroll bar in my form to allow users to scroll down to the bottom of the page. When I switch to design view, a scroll bar is automatically included, but when I switch back to form view, there is none. I've tried inserting a scroll bar from the "More Controls" button list, but it won't scroll my form: the slider just blinks when I try to move it around. Any help would be appreciated.
View 1 Replies
View Related
Dec 13, 2005
Hi everybody. I need some major help. I created a form that does not fit in one screen (too long),so I use scroll bar. The problem is that when i turn the wheel up/down on mouse, it flips through all of my user IDs, like ID1, ID2, etc. instead of scrolling down. What do you propose? Thank you.
View 2 Replies
View Related
May 3, 2006
Hi! How can I disable the scroll button of the mouse?
View 1 Replies
View Related
May 20, 2006
Hi all,
I have read much about disabling the mouse scroll bar - but my problem is that while I want the use of the scrollbar, it is very jumpy.
Does anyone know how I can control the functionality of the scroll bar?
Cheers
Robert
View 1 Replies
View Related