Essentially I have a form_A with several tab's and then one list control box in each of those tabs. At present if you double click on any item within the control boxes your taken to another form_B with info about that item and when you close that from down again if refreshes form_A.
Is it possible to only refresh the specific list control box that is active instead of refreshing the whole form ?
I have an unbound form with a combobox which needs to be validated before the control is updated.In the Before Update event I check that the value is valid and need to reset the value back to the previous value if not valid and then change focus to another control.I thought that the following code would work but the selected value remains in the control and I cannot move the focus to another control.
Code: Private Sub cboYears_BeforeUpdate(Cancel As Integer) Dim dteNewDate As Date dteNewDate = DateSerial(Val(Me.cboYears), Month(Me.txtCalendarHeading), 1)
I am trying to use a query to find the previous record of a transaction and provide an additional field that computes the difference in the dates in days. (The days from TransferID 23 to TransferID 24)
I have built an automated procedure in VBA Access 2000 that is now great (thanks to a lot of downloaded help from this forum). I use the MSCOMM active-x control to talk to an instrument via the serial port.
Question: Is that control only working because I also have VB6 installed on this same computer? It seems to me that I tried something like this a year ago and could not get MSCOMM to work in Access, but at the same time, I didn't have great MSCOMM examples to go by. I do now as I could rob them from other programs my company has written in VB6.
I have both VB6 and Access 2000, but chose to develope this procedure in Accesss because of the heavy amount of data to store (and I know VBA much better than I do VB6). I thought Access is a natural. But now I am wondering if I will have problems distriubuting this database to other service offices that may not have a machine with VB6 on it?
Do they need just plot MSCOMM32.OCX in to their system32 directory?? :confused:
Please can someone advise me how I can link the date which I select in the calendar control to a date field in the form. I want to use the calendar instead of a combo box. It's probably simple....but then so am I! Help appreciated Richard
when i select a button from the active control menu and want to use that button for either next record, previuos record. attach macro, print, i am sure that was part of the menu when selecting the button. i am not seeing that menu when i select the button from the active control could you please tell me why
Please can someone tell me how to change the back colour of a control when it has the focus and then revert to the original colour when it loses it. I have 35 controls on my form, so I need a function, rather than changing the colour with a subroutine evey time.
I have searched the site and haven't found whatI want-though I'm sure this question has been asked before.
Could anyone point me in the right direction re the Crystal Reports Active X viewer control and access forms. I loaded it onto a form in access 2000, but can't seem to find any meaningfull properties I can manipulate (especially the report source). I am thinking it works like any other active x control and I can manipulate properties through code, however, the main property I would think I need (source report) does not seem to exist. I have Crystal 10.0 loaded on my system.
I have a database with a filter on the form which users can apply I know at the bottom of the form it highlights it as filtered but I want something a bit more prominent displayed on the form when a filter is active.
This is executed by an event in another form that loads the new form and starts dumping in values. For some reason I'm suddenly getting "Object doesn't support this property or method. 'Object' is simply a textbox that is enabled, but is also locked altho to my knowledge this isn't a problem. It's late and I've been working for hours so this may be something simple I've overlooked...need to step away for a while.
I have a big table, EquipmentDetails and separately I have job plans.Job plans can have many pieces of equipment. I store the relationship in EquipmentDetails_JobPlanDetails, but am feeling frustrated as I can't seem to get Access to build the SQL query from this in the way I want.
I am generating a List Box in a form which is populated from a query.The query calls on a table which lists ItemID from EquipmentDetails and JobID and in the current form (where the list box is) I want to pick up and display the ItemIDs associated with that JobID. The current JobID reaches my form correctly (I've proven this by displaying it in a text box) from the previous form.
The problem I have is that I can't seem to get the SQL query to only get ItemIDs that are linked to the current JobID. No matter what I try, it either gets all of the ones in that table, or I can't compose one.What kind of SQL do I need to only grab the ones relating to the current JobID please?I've tried building it in the design view but it says that it can't do it because the outer joins are ambiguous.
I am trying to have cascading forms running on my database. The first form adds a new staff member. When you press the next button this happens...
Private Sub Command12_Click() DoCmd.Close DoCmd.OpenForm "Frm2" End Sub
But I want it to open Frm2 using the ID from the previous form. The stumbling block for me is I close the first form before opening the next so I cant pass the ID across.
I'm trying to design a simple wildlife tracking DB, so that when myself or my colleagues spot an animal we can enter its ear tag number via a form. That will either bring us up a list of previous dates/locations that animal was observed, or if it's not in the DB, allow us to enter the new animal and location.
I have two main data tables: dt_Animal- which stores the ear tag info, species, and other information about that unique animal dt_Sightings - stores info on when/where animals been seen (linked to dt_Animal in a one-to-many relationship, of course)
What I want is that when you open up the form, you get a box (text or combo) to enter the animal's ear tag number.
- If it already exists in the DB, it brings up all the info on that animal and its previous sightings - with the option to fill out any missing info and (of course) to add a new sighting - and it WILL NOT add a new record to dt_Animal - just to dt_Sightings - If it DOESN'T exist in the DB, it creates a new record in dt_Animal and allows you to enter any/all of the other information
Where I'm running into problems is that I don't want duplicate records in dt_Animal - each animal is unique. I haven't found a way to set up a form so that you don't get pop-up errors if you're typing in an ear tag number that's already in the system.
I've tried various tactics involving simple coding (NotInList, etc.) that I pulled out of this forum and other places, but haven't had any luck.
I'm fairly new to databases and have been attempting to build a multi-table database. It's not properly rationalised, but I wanted to test run it to ensure it was fit for purpose first.I've built my form, which is pushing data out to several tables, but I cannot seem to get the form to pick up previous records.
I've inherited an Access 2010 database that needs tweaking. I have a form, let's call it CALLED_FORM, that is loaded from various places - ie there are quite a few places that do the following
This works great when called from most places but if it is called from 1 specific form there is a likelihood that some code is executed that shouldn't be.
So I want to be able to do the following
In CALLED_FORM I want to be able to skip some code if the previous form is say FORMX. For all other forms I want it executed. E.g.
If PREVFORM <> "FORMX" then code more code even more code End If
Is there a system variable for PREVFORM.
I know I can change coupleofarguments to threearguments and pass something over in that to show which form it has been called from but that is a bit difficult.
I'm setting up some analytical reports and i'm having a hard time with some date criteria.
I've gotten monthly averages already and what i want to do is take those monthly averages, and average them throughout the year. (the year being from the specified date on a form control back one year)
Month([Forms]![Report Runner]![Date1]) and Year([Forms]![Report Runner]![Date1]) worked great for specifying a certain month in a certain year, but what i'd like is to show all the monthly numbers for every month going back one from [Forms]![ReportRunner]![Date1].
I tried this:
Code: >(Year([Forms]![Report Runner]![Date1])) And <((Year([Forms]![Report Runner]![Date1]))-1)
In my database scenario, a patient would see a doctor and the doctor would check off fields in a form representing different disease symptoms that the patient has to calculate a final score (for ex. if the patient has 2 symptoms, the final score would be 2).
After a few months, the patient would visit the doctor again, and the doctor will have to fill out the same form, adding any new symptoms the patient might now have. I would like to have the disease symptom fields checked off in the previous visit automatically show up in the new form, so that the doctor only has to add the new symptoms, and then recalculate the score using both the old and new data (for ex., if the patient had 2 symptoms before and 3 more symptoms now, the score would be 5).
I wish to highlight some fields on a form if their value differs from the previous record.
I'm OK with the code to determine this, but unsure as to where to put the code to set the fields initially?
I have two strings txtPrevPayment_Method and txtPrevProduct.
Where can I set them 'once' to be the same as the first record loaded in the form. Then in the Current event I check if they have changed and set font colour accordingly.
Ok, this is what I have, I have a database that has 3 tables, a year table, that all my forms get inputted into, a table that has manufacturer addresses on it and a table that has sampling locations.
On my form, I have it where there is a drop down box, so you can just select the name of the manufacturer and select the name of the sampling location. But what I want it to do is, that you select the name from the drop down box and then in another box or two it auto populates the corresponding street address, and city for both the manufacturer and the sampling location.
I am tasked with creating a scientific database of fish catches at various different sampling stations. I envisage the entry form having hierarchy levels, ie year, season, date, sample station, species caught, and then the specific associated data with each species (weight, abundance, length etc) will form each distinct record.
In each year there are 2 sampling seasons. In each sampling season there are up to 20 dates on which samples are taken. On each date there are up to 50 sample stations recorded. And at each station up to 20 species can be recorded.
In order to enter each species caught in a survey, the end user will potentially have to fill the season box with an entry 40,000 times. For each season there will be 20,000 date entries to be made. For each date, 1,000 station code entries, and 20 species entries for each station. What I would like to happen is this.
When the end user is entering the data, he or she will be working through the hierarchy from the ground up. Ie., they will enter a particular species' data (abundance, weight, length etc) at a particular station on a particular date during a particular sampling season. The next entry will be a different species at the same station on the same date during the same season. I would like the duplicated information from the previous record to be copied across onto the new one so that all the end user has to do is enter the species name, abundance weight and length data.
Once they have finished entering all the species data for that particular site, they can move onto the next site which they would fill in the data themselves for the station code. So, in the hierarchy, the first button would copy all the previous data except the species name and associated weight length abundance data. The next button would do the same, except leave the station code blank. The next button would leave the species name, station code and date blank. And so on up the hierarchy. The end user would be able to selectively choose which data is copied over by using these buttons, saving lots of potential extra work doing repetitive entries.
I have a 2010 Access Database with a Navigation Pane. When I click a Navigation Button to view another form I lose the position and record I was on in the first form. It's almost like the first form refreshed when I click the navigation button to view the second form. Is there a way to setup the Navigation form so when I click on various navigation buttons it won't reset the previous form I was on?