I have a numeric value in table A followed by its form, i need to highlight the filed at form if the numeric value becomes same for table A & B this i want to do with the form of table A no matter what the color of highlight is.
I am interested, is it possible to read currently selected (highlighted) row in table?
I know that this is possible to move cursor on concrete field in table via VBA but is it possible to read record number when we move cursor manually (via arrows)?
I receive a bunch of excel files with items to be added to a database. some of the items are to be added as new, some to be deleted and others to be modified.
I identify the action (add/delete/modify) by looking at a column in the excel file e.g. column A.
At this point I am fine with the add/delete because I can filter the data or bring all the files to a temporary table in an Access database via vba script and then running queries to do the rest.
My issue is that the spreadsheets have a lot of columns and for the modifications what they do is use the same file for instance, make changes on the cells (any cell) that need modification and then highlight, bold or underline only the items that need modification and ignore the rest of the file (a tedious process since I have to then open each file and manually modify the database).
Can anyone please help or advise where I can look for help on this problem. I have a subform which shows all my outstanding orders. Below it is a calculated field which shows the total weight of all the orders. (Steel Beams) I would like to be able to highlight the weights on certain orders & show total weight for only these orders. (Similar to the way it can be done in excel) I have been trying to do it via a query with a Yes/No check box & when I check the orders required the total weight changes. But I cannot get it to work properly as this puts a Yes in the field & the record disappears. I only want it for a quick reference to save doing mental summing up so don’t want to change or add anything to a field to get answer. Can anyone give me any ideas please?
when i generate a report i intermittently get a page that has the detail section highlighted. The report generates an invoice for each customer selected, a new page for each invoice with a repeating header on each page. I have used the vba to some of the formatting on the page. Usually there are between 20-40 pages generated with each report, or there is an option to print just one invoice. I get the highlight on 1 page on some set of invoices, and other everything works fine.
I can not for the life of me figure out what variables are causing the detail section to be highlighted. Does not repeat on a specific customer, place in the report, or any specific that i can tell. What settings/variables/triggers/events would cause the detail section to become highlighted blue.
Right now i can generate the report, see a blue page(usually after its printed), and the regenerate it and its not there or on a different page. The invoices uploaded are for the same person generated right after each other..
I have the form (PROJECT DETAILS) that displays a specific record's information, one record at a time.I would like to click a button to export 5 specific fields (name, phone, address) of that form ("Project Details"), based on the PK "AssignNr", and then insert those fields in an already created Excel form that has those fields blank, but other fields filled in.
And then, as part of the same macro, I want to have the Print pop-up come up in the Excel form to select where/how that file will get printed.I've tried exporting from the Project Details form, but it exports all the records. And then I am not sure how / where to code the vlookup formula (if that's even necessary) to take the data from the exported file, into the existing Excel form that needs to be filled in.
Can this even be done in one macro, or do I need to create two - one to export data from Access to Excel. And then another in Excel to vlookup the details from the exported file, into the existing Excel file.
It would be nice if I didn't have to put in what the vlookup criteria is. (i.e. AssignNr (which is the PK)) - if it could just be taken from the PROJECT DETAILS form's current record selection.
I have a daily report that shows data from previous day for production. When we have new products produced, I would like a field to be highlighted if it is the first time it has come up. I do not want it a unique field just from yesterday, but to analyze the table of all of the production days and highlight if a particular field from a column is unique. Can this be done?
I have a reporting interface providing users with a multitude of reporting options and capabilities. One aspect involves utilizing the ability to allow users to save their settings on the interface due to the number of options provided. One of the aspects revolves around working with listboxes.
Each listbox is pre-loaded every time with a list of items from a master table pertaining to the listbox. The user selects their desired choices, saves*, etc...Once loading a setting, I'm looking to have the listbox pre-loaded (easy) but then auto highlighting the items selected or rather pulled from the user settings table (each listbox has own table for user saving of options). So, if a user selects items Alpha, Beta, Delta, and Falcon from a list of 100 choices, then those 4 items would be saved under that user setting, within the code table (user specific). When they load the setting back onto the user interface, it should pull the 100 choices and auto highlight the 4 items. Hopefully I've explained that properly.
*A user is able to save, save as, load settings, unload settings, etc...from the reporting interface. When a user saves settings, these settings are saved within the user settings tables. Each table varies depending on the nature of the values within the reporting interface. Listboxes have their own tables connected to the primary settings table.
I'm using 4 combo-boxes in order to filter a tabular form in access.
One combo box is for a company name the second is for a report type and the third and forth is for choosing years. I used VBA in order to apply the filter:
Each line works by itself but I cant figure out how to combine them together, or how to use "AND" between each filter so the filtering will refer all of them when I run the code.
I am trying to send an email from a form in Access 2013 using fields on the form as part of the email body and I can't seem to find code to just do this.
I don't need to loop through tables as the send email address etc will be on the form together with appointment times etc ...
I am using the following by Allen Browne to sort one field. But now I need to sort on two fields.
Code: Function SortForm(frm As Form, ByVal sOrderBy As String) As Boolean On Error GoTo Err_SortForm 'Provided by Allen Browne 'Purpose: Set a form's OrderBy to the string. Reverse if already set. 'Return: True if success. 'Usage: Command button above a column in a continuous form: ' Call SortForm(Me, "MyField")
What I am trying to do is create conditional formatting to colour fields within a form.
The conditional formatting option built in allows me to colour based on set values i.e. Value=Design turns green. I need to somehow say if Value contains the word Design turn green. This is because in addition to the word Design there will be a variable description. I tried editing the conditional format created by the wizard to Value="*Design*" but that didn't work.
Now I'm trying to write it in VBA code but am still struggling. Here's what I tried but it doesn't like it:
If InStr([Forms]![Query2]![Activity] Like "*Design")>0 Then [Forms]![Query2]![Activity].BackColor = vbGreen End If
I'm trying to lock certain fields on my form based on the value in a particular field. It seems to work the first time but applies itself to all other records in the database from then on!
The starting point is a command button that sends an email and makes Me.DPLLock = 1. The corresponding table entry is formatted as a number.
The code is...
Private Sub Form_Current() If Me.DPLLock = 1 Then Me.OR_Name.Locked = True Me.OR_Sales_Order.Locked = True Me.OR_WO_No.Locked = True Me.OR_Qty.Locked = True
I have a form with fields that contain the address/postcode etc of the person in question, and I also have a template letter that needs to have said persons address/postcode etc at the sending stage after a button is clicked.
I'm creating a search form to filter out data based on certain inputs. My VBA code looks like:
Code: Private Sub Command18_Click() On Error GoTo errorcatch Me.Filter = "([Experiments.Log] Like ""*" & Me.Text21 & "*"") AND ([Expdate] Like ""*" & Me.Text22 & "*"") AND ([BaseSolution] Like ""*" & Me.Text24 & "*"") AND([AddCom] Like ""*" & Me.Text25 & "*"") AND ([Test] Like ""*" & Me.Text26 & "*"") AND ([Plan] Like ""*" & Me.Text23 & "*"")"
Me.FilterOn = True Exit Sub errorcatch: MsgBox "Error #: " & Err.Number & vbCrLf & vbCrLf & Err.Description End Sub
However, the output does not include records where other fields are blank. I have read that I may need to use Is Null but am not sure how to.
I have a form with various text, date and combo controls. There is a button at the button that runs a macro (Close NB) at the bottom. What I'm trying to do is bring up a msgbox if certain fields are blank and not run the macro. I only want the macro to run if all the fields specified have data in them.
The fields are : cmb_cliname cmb_disease cmb_projectType cmb_ProposalStatus
The on click code is: If (Me.cmb_cliname Is Null) Then MsgBox "Please fill in the relevant details", ElseIf (Me.cmb_Disease Is Null) Then MsgBox "Please fill in the relevant details"
I am using .FormFields to fill a quotation template in Word, but the subform I am retrieving the data from has rows of records under each column and I need to send more than just the first row to fill the required bookmarks in Word.
I have a form that I have exported certain fields into a word doc (it is up and running just fine). I created bookmarks in word and put some VBA into my access form, so when I click on 'Create word report' it pops up and automatically populates the record I am on. Here is the tough question,
How to make this work with a continuous form? My main form has several subforms, one being a continuous form. The main form shows one bridge at a time. The sub continuous form shows information for all of the bridges spans (could be anywhere from 1 to 9).
I'm trying to make it a little further with my new call answering database at work.
Basically it consists of a main form that has a button leading to a call answering form for each business that we represent. it also has a text box that displays the number of the caller when the telephone picks up, the correct call answering screen is also popped by the telephone software and a macro whenever the phone is answered.
I've got code in place that automatically puts the date and time in the correct field and also copy the incoming telephone number from the main form into the caller number field on the call answering form.
I'd like to take this automation a little further now and get the form to autopopulate the caller details if that caller has called before (we get a lot of calls from the same people) so i'd like to make the form search the table it's linked to for the incoming phone number and to fill in the name, email, company etc... for the caller according to the previous record.
The code for the 2 forms i've currently got setup (the switchboard and one call answering screen) are as follows
Switchboard:-
Code: Option Compare Database Dim WithEvents MaxxCom As Metro_MaxxCom_CTI_COM_API.CTI Private Sub cmd_onnet_Click() DoCmd.OpenForm FormName:="On_Net_Communications" End Sub
I have a database that will register the emails coming in and what time, also the time, date out and person.
I have a form with the fields to be filled in and a submit button. There are some fields that are automatically filled in and others need manually fill in.
below that part is a sheet (subform in the form of sheet) that should be filled in with the above data. Once it is there, it should empty the fields so they are ready to be filled in again. If I fill new data and press the submit button, it should go to the next available row.