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?
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.
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.
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.
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
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.
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!
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.
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
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.
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.
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.
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.
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
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.
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????
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.
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.
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.