I have a continuous form with a combobox and a text box. In the after_update event of the combobox I want to setfocus on the text box - of the specific record that I'm on. I tried using Me.CurrentRecord but that returns me to a completely different record than the one I was on. How can I setfocus to the text box of the record I am on?
Code: Private Sub Text74_AfterUpdate() Me.Text1280 = Environ("UserName") If Me.Text74 = "MACGH" Then Me.Text89 = "PureGene" Me.Text85.Value = Date End If End Sub
Is there a way to insert a line of code in the above that would add the next number to a 2 specific textbox's (Text103 and Text509)? Maybe if a table was created with all possible values and then the code would reference that table. There is probably a better way though. An example would be, if record 1 is A1 (in Text103) and 1 (in Text509), when record 2 is entered Text103 would be A2 and Text509 would be 2. Record 3 would be A3 and Text 509 3.
I have successfully put together some VBA code that will accept a user's input into a textbox on a form. A cmdFindprinter button is clicked and the query is ran. The user is asked via an inputbox for their login ID so that the query is exported to a text file on the desktop. The query then pops up in a new tab and also automatically exports the queried record to a text file on the desktop. I have upward of 30 users using this form at any given time and I need the following automated.
What I would like to do is to have the text file go into a specific format. For example:
IP address: Serial number: Location:
The name of one of the queries is "Xerox IP Query", the field names would be "IP Address", "SerialNumber", and "Site Name".
This is what comes up in the text file right now:
"CXF345946","157.229.243.58","123 Happy Ave"
I'd like to remove the quotes and have the info fall into place as shown in the example above.
This is the code so far:
Code: Private Sub cmdFindprinter_Click() On Error GoTo cmdFindprinter_Click_Err Dim strPath As String userNT = InputBox("Please enter your NT ID", "ServiceBase Xerox Printer Query", "Enter your NT ID") strPath = "C:Users" & userNT & "DesktopPrinterQuery.txt" If Heading = 0 Then Exit Sub
I have 5 textboxes and a multiline textbox in a form in my Access Database. I am going to type several keywords in those textboxes and I am going to type an article in the multiline textbox.
What I need to do is I want to calculate the keyword density in the article. I can do that if i know how to search the whole text in the article and count the specific word. And I want a function to count all the words in the article too.
how to read a specific line in a CSV file (using VBA), to see if the phrase "There are no records available." is present.
If it is present, then I'm going to do a debug.print stating that there are no records to load - and then the script will move on to the next file. If the phrase isn't present, then I'm going to upload the file to Access, parse the information, and then upload it to a CRM. (I already have the latter portion of the code up and running....I just need to account for the first part, where I can determine if the file has data or not).
The structure of the file never changes. The first row is composed of eight column headers (Post Date, Card Number, Card Type, Auth Date, Batch Date, Reference Number, Reason, Amount) and (if) the phrase "There are no records available." is present, it will show up on the second row, in the first column (under Post Date).
the next and back button work fine. the trouble i have is with the bleu balls when you focus on one of the balls a text must come to the text field. i used a label and an caption code but i dont get it to work i still need to click for it appears. And thats what i dont whant because when you click another form i beiing opened.
I have a form with two text boxes in which I would like to insert the current date automatically when the text box has got focus. Default value doesn't work because the current date may occur on two different days, and the default has to be null until the current date is inserted.
Can someone walk me through the process? Thank you.
I have a form and one of the text fields I need to verify against data in a table. I think the best way is to check the field once it loses focus on that text field. If the data is not in the table then the user is prompt with a msg "Invalid data, Please try again". I'm using Access 2010 to develop. I need query to run the validation.
I want to hyperlink from a query direct to the relevant record in a specific form. I have a hyperlink field in the form which shows up in the query. When clicked in the query, this hyperlinks to the form but I cannot make it select the correct record in the form.How do I get it to select the correct record?
On a main form I have 2 sub forms. On the main form I have a command button that asks how many guests in a booking and depending on the response populates the subform with Guest Names. However it will only do this if I click on the subform and then click the command button.
I want to include some code that sits behind the command button on the main form that will duplicate the otherwise manual selecting of the sub form. And I am thinking this is a SetFocus procedure.
I have tried this code; [Forms]![Booking].[SubForm1].SetFocus where Booking is the name of the form. I do not know whether the Subform is #1
i have a button that allows you to "edit" the show that is selected. You can double click the show name from the list box, and it opens that show in viewing mode, but you cant edit it. You can click the edit show button in the form that you view the show with, but I want to be able to edit that show from the main form with the list box. But, the problem im having, is if someone clicks the "Edit show" button without have a show selected, they get a error.
If lstShows has focus Then DoCmd.OpenForm "frmEventsEdit", , , "EventID = " & Me.lstShows
Else 'do nothing, since having no code here, it does nothing
End If End Sub
That is what I want, but I cant get access to open that show up if its selected.I need to be able to tell if it has focus on it, and to open that selected show up.
If i open a form with a sub form on can i open it so that the focus go directly to a control on a sub form.I have tried to do it with a macro on the on open event to go to control but it comes up that the control don't exists on the sub form.i am using access 2010.
I have a customer provide his or her SSN. If the SSN matches a record in a table the form opens specifically on that record (no problem). If the SSN doesn't match a record, the form adds a new record (again, no problem).
The issue I'm having is with the new record. The customer is able to scroll through other records (page up, page down), which is a no-no. I need the form to be locked on the new record. I've posted my code below.
Private Sub Command543_Click() On Error GoTo Err_Command543_Click Dim strCriteria As String Dim rst As DAO.Recordset Set rst = Me.RecordsetClone
and two sub-forms called "frm_fabricator" & "frm_engineer"
On the sub form "frm_fabricator" I have a combo box and after updating this combo box (called fabricator) I would like the cursor to jump into a field called “ApllicationsEng” on the other sub form "frm_engineer"
I have a subform that I use to scan in products using a barcode reader, when the item scans it moves to the quantity (Qty) field where I have this code:
Code: Private Sub Qty_GotFocus() Qty.Value = 1 DoCmd.GoToRecord , , acNewRec txtOrderNo.SetFocus End Sub
I am simply trying to set the Qty value to 1 and move onto the next record ready to scan another product in.
I have a Dynamic Search form, which I use to search for client, on the double click it takes me to the client, at which point I have the Forms Visible set to False.
When I click on a button to open that Form, the Visible turns back to True, however it shows my last search results, how do I clear it so that when I call it back up it is ready to search again, and my focus is set to the SearchFor box.
In a form, I go to a textbox with setfocus. The whole text is selected then. But how can I place the cursor after the existing text, so that I can begin writing immediately?
When the client clicks in a text-Box or Combo-box in a sub-form, the field seems to jump to the side. in this image it jumps to the left, but jumps to the right to..., it is quite irritating, especially attempting to open a combo-box list, and see the button jumping aside.We renewed the file many times, so I don't think it is corrupted, but go know..the file can be accessed via network or terminal server, the pic is from terminal, but happens via network too.
I have a single main form with a datasheet subform. When I scroll through the records shon in the main form, each has a different set of child records shown in the subform.
I want the focus to be on the last record of the subform each time.
On the main form, I have a button and this code
Code: Private Sub cmdLast_Click() Me.frmRevisionsSub.Requery Me.frmRevisionsSub.SetFocus Me.frmRevisionsSub.Form.txtRevTag.SetFocus DoCmd.GoToRecord , , acLast End Sub
which works perfectly, when I click the button.
If I call this code from main form's OnCurrent, focus remains on the first line of the subform instead of going to the the last. I have an inkling that it has to do with when the requery of the subform takes place, when I scroll through the records on the main form.
I am having trouble setting the focus on my forms... I have a parent form with two labels that are coded like this.
Private Sub Advisory Messages_Click() Me![ Advisory Messages].Visible = _ Not Me![Advisory Messages].Visible End Sub
[code]...
I have the visible property set to no on the subform allowing the user to toggle the visibility when the label is clicked. The problem though is when I click inside the subform to use the scroll bar to view records, it transfers the focus to the subform making it almost impossible to close by clicking the label again because the label is on the parent form. I found the "me.parent.setfocus" command and a few other set focus commands but I don't know what I should be applying the command to in order to make it work.