I'm stumped and spinning my wheels like so many Milwaukee drivers after yesterday's snowfall. I have a series of forms named Survey1, Survey2, Survey3, etc. I also have a form for recording notes. When I close the notes form it is meant to post the notes into a hidden memo field on the survey form I am working with. I would like to keep the number of notes forms to one. I would like to refer to the survey form dynamically. Currently I am trying something like:
Dim SurveyForm As Form
Set SurveyForm = "frmSurvey" & Forms!frmMainScreen!SurveyDID
Forms!SurveyForm!MEMO1 = Forms!frmFreeText!Text0
I keep receiving an 'object required' error. Has anyone done anything like this? Can it be done? How?
i need to refer to one textbox if the value in a related and similarly named textbox meets a certain condition.
for example:
txt_MMC_Fail_Rate and txt_MMC_Fail_Count
if the (calculated) value in txt_MMC_Fail_Rate exceeds 3%, i need the backcolor of each of these controls to change to hilight the failure to the user.
i'm iterating through the controls collection, but can't figure out how to refer to the fail rate when i'm looking at txt_MMC_Fail_Count. what i hope to be able to do is strip off "Count" from the current control's name and append "Rate", then use that value to refer to the txt_MMC_Fail_Rate control.
is this possible? if so, could someone educate me, because all my attempts have failed...
thanks, john
(edit: i am aware of the conditional formatting available directly on the control, but prefer not to go that route if possible. due to the number of controls involved, and the fact that documenter does not pick up conditional formats, i prefer to do this in code.)
I have a form that shows a list of all of my records in my database. I want to be able to click a button called "Report" and have that print a report that has all the records I have filtered on my form. I have a report in the format that i want it in, however, currently it prints every record and not just what is shown on my form. (The form is dynamic and I want the Report to be dynamically based on the form) HELP PLEASE!
Hi I am a totaly newbe in programming... I have read manuals on as programmig, tutorials etc, but I got to a point where I have too many questions... please help
I have created an html form (it is a asp file in oder to do the form dynamic), a dabatase in ms access and a link i asp in order to store the data i the db.
A part of the form is "radio button" choice section. Now I need to look in the database if a specific choice has been made already and disable correspondign radio button i the form.
Is it possible and what would be the script?
And a little one - I want to get email notifications when a form is submitted with the form results.
Hi, hope this is a reasonable thing for semi-beginner to intermediate person to do.
Our MS Access 2000 db shared on a server stores projects, categories of projects, clients, contractors doing the projects. Contractors are offered projects within their chosen categories based on their order on the list (last company who was offered a contract goes to bottom of list, like that).
Currently we print out a phone list of the contractors (in desc. date order of the most recent offer accepted or refused), then we phone down the list until someone accepts. Later we enter all those offers in order on frmOffers to store the date & time stamp of that offer.
Problem is, several contracts can be on offer on a given day, so when a company accepts/declines Project A, that company is still showing as high on the (paper) list for Project B. So when we have 3 people phoning they don't know they've offered multiple contracts to the same company this morning.
Is it possible for a form "Offers" to be based on a query that keeps updating like that? For example, you open frmProject to display details of a certain Project, cmd button to open frmOffers (continuous form, showing all offers so far with company, phone #, "accept"/"decline" & date/time stamp). Then, when you tab to the next record, can you have it show which company is next in line (even as the person beside you has updated their frmOffers in the meantime)?
Would you need to have a separate table storing only the most recent offer for each company? If so, how would you get that updated all the time?
Anything you could offer to point me in the right direction would be very much appreciated!!
I have a form with payment information and need a list, what date the payments are due. These can be only 2 or 3 payments up to maybe 24 payments. The result I want is something like this:
Date Amount Total paid 1.7. 500.00 500.00 1.8. 500.00 1,000.00
The list itself is not a problem, but I need a list who only shows the number of payments as agreed, 2 lines (with paydates) if 2, 12 if 12 payments. I have the information of the total amount, the number of installments and the first payment date.
I've built a function that open a form in Design mode, read records from a table about appointments and create a grid with textboxes representing one appointment each. On the left there are labels with hours and as column headers there are doctors names. Practically each column shows each doctor's daily appointments (it is a medical clinique).
Every time i change the date all controls are deleted and rebuilt.
But after three or four day I pass I get a message of memory limit.
The question is general : Why the memory finish if I close every variable I use during the creation with the instruction:
set frm = nothing set newTxt = nothing rst.close set rst = nothing
I am trying to reference a field on a sub form from a button on the main form. I want to read a field called "Date1" and I want Date1 from the first row, regardless of which row has been selected by the user. The statment used is
I have Form A that has a combo box and a "Submit" button. When the user clicks on the Submit button it needs to open Form B. Recordsource of this Form B is "Query B"
Item selected on the combo box becomes the criteria for "Query B and Form B needs to be opened based on that criteria.
What is the easiest and fastest way (no dlookups please!) to do this?
If an illustration is possible through an example that will be wonderful.
I have inherited maintenance of an Access DB that I did not design and I'm having trouble with their Navigation Form setup. I created a form with a list box and two date fields, and figured out how to build a filter for the form that would open a specified report on a button click. It worked great as a stand-alone form, but when I added it to a navigation control in a navigation form I can't seem to find the right path to tell the VBA where to look for the filter criteria.
In the screen shot, the report to be displayed is in the detail of the "Report Center" tab on the far right of the navigation form "Main." the form "FilterSelection" is inserted in the "NavigationControl0" section under the navigation tabs. Criteria is selected/entered in "FilterSelection" and needs to be passed to the filter of the report that is opened when the "Project Tasks" navigation button is pressed. As I mentioned, when I created the form I put a button on it to open the form with the filter (built via SQL in VBA) it worked beautifully. But now that it's on the "NavigationControl0" object Access errors and can't find the fields where the data has been selected/entered.
and wanted to change this. I have this on the On Current event and it gives me an error because the data is not in the record source when the form opens. How can I change the me. to the formname? The form gets dynamically created so i have
Dim CurrentForm As String CurrentForm = Me.Form.Name
then i put
GBL_Tab05ID = Forms(CurrentForm).Form.Tab05ID
but that did not work...what is the correct syntax?
I have created an Access Form wherein i have given lots of text box and text areas...
Now i want to create a word document dynamically using the information that has been given by the user via the Access form...
I want to create a Table dynamically in the Word Document using the VB code behind an access form... Also through that code i want to manage the font of Word Document and most if its controls..
Can u plz help me in this or provide me with a document wherein i can get some info in regard to it i.e. to manage the Word using Code...
I'm a BA so i'm converting my excel issues list into a database with a front end where i can create new issue records this uses a form that sits on top of the issues_table.
Howver, i have created a table called Projects and a table called Test_Plans
Each issue is logged against a project and a test plan. Lets say ProjectA has TestPlan1 and ProjectB has Testplan2.
On my issues form, i can select ProjectA in the project field.
In the Testplan field i can select EITHER TestPlan1 or Testplan2
Testplan1 is the only valid entry.
How do i
a) Once I have selected ProjectA in the Project field only display Testplan1 in the Testplan field?
or
b) If the user tries to enter testplan2 for it to error?
I've tried creating a query and linking the controlsource field to it but it doesn't like that!
I have a DLOOKUP which is used to auto populate a field on my Income Commitment Form based on a field on my Expenditure Commitment Form.It works perfectly when you enter a new commitment.Currently you enter a new Expenditure Commitment, save it but don't close it, then from the Expenditure Commitment Form there is is a button to enter a related Income Commitment. You save the Income commitment then close it, then close the expenditure form and you are on the Client screen with both these forms now showing as subforms, both have record selectors.
My issue is, that sometimes the Expenditure Subjective can change, so from the client form you use the record selector to open the Expenditure Commitment and select the correct Subjective, you then save it and close it. You should then click on the Income Record selector which opens the income commitment, but when you re-click on the Combo42 button, it doesn't reselect the Income subjective and I think it is because the Expenditure Commitment which is what it is looking up isn't open. My issue is how do I get the DLOOKUP to work and refer to the Commitment Form if it is a new commitment, or the Subform if I have gone back in through the record selector.Here is the code I have.
Private Sub Combo42_AfterUpdate() If (Me.Combo42 = 1) Then Me.IncomeSubjective = DLookup("[Subjective]", "tblIncomeSubjective", "[ExpSubjective]='" & Forms![frmCommitments]![cmbSubjective] & "'") Me.OtherIncomeConfirmed.Enabled = False Me.OtherConfirmedBy.Enabled = False
I have form named SearchForm and there is unbound subform named Search_blank. Depending on button in menu is used source object of Search_blank. One of the source objects is form named MeasureForm and it has subforms named MeasureForm_sf1 and MeasureForm_sf2. How can I reference public sub in MeasureForm_sf1 from SearchForm? How can I reference public sub in MeasureForm_sf1 form MeasureForm_sf2?
There might be a problem with unbound form. I tried reference public sub named GetLastVal from SearchForm that is in MeasureForm:
Code : Me!Search_blank.Form.GetLastVal
and it was working. Than I tried reference public sub named GetLastVal2 from SearchForm that is in MeasureForm_sf1:
I am using John Big Bootys Dynamic Search Form (built in Access 2003) as it totally met my search requirements, however when typing anything into the search box it is realy slow, taking several seconds for each letter to show in the box.
This has always been a problem now and again, however some of us have upgraded to Office 2010, (although still using the 2003 built Db as we won't move to a 2010 version Db untill March next year) and now the problem is even worse that ever. Everything else seems to work really well except for this search function, however it is the search function that is used more that anything else.
I am working on an form (using Access 2000 and VBA) that stores registration information, along with events that were attending, in a table and later retrieves that same information from the table to display the regist. info, events attended, and allows the user to change any current info along with adding new/recently attended events to each record. I am currently allowing a max of six events, along with event details, to be stored and I am running through six different if statements to match the Event_List (name of the combo box that contains "Event 1 Event 2...Event 6") to the appropreiate information in the table. I have started to simplify the code to remove the redundancy by running a Do While to to find the correct Event by using an integer variable that starts at 1 and is incremented until it matches the 7th character (the number portion) of the Event chosen from the Event_List. After this I want to use that integer variable to say what event information in the table to gather. My problem is this: I have tried many different varieties of the following code and I am unable to make it work. I had never used Access up until a week and a half ago, and a few days ago I went and bought the book "Access VBA Programming for Dummies" but it doesn't help for this problem. Here's part of the code:
Variables (Event_Name, PMT, Receipt, Payment_Type, PIF) refer to Form textboxes while the variables in the [] refer to table field names.
'------Code I'm Currently Working On------- Dim intX As Integer Dim EventVal As Integer Dim strX As String
intX = 1 EventVal = Val(Mid(Event_List, 7, 1)) Do While EventVal <> intX And intX < 6 intX = intX + 1 Loop
strX = str(intX) Dim E_Name As String Event_Name = [Event strX ] PMT = [PMT strX] Receipt = [Receipt strX] Payment_Type = [Payment Type strX] PIF = [Paid In Full strX]
'-----Old Code That I'm trying to simplify------- If Event_List = "Event 1" Then Event_Name = [Event 1] PMT = [PMT 1] Receipt = [Receipt 1] Payment_Type = [Payment Type 1] PIF = [Paid In Full 1] Camp_Site = [Camp Site 1] Cabin_Number = [Cabin Number 1] ElseIf Event_List = "Event 2" Then Event_Name = [Event 2] PMT = [PMT 2] Receipt = [Receipt 2] Payment_Type = [Payment Type 2] PIF = [Paid In Full 2] Camp_Site = [Camp Site 2] Cabin_Number = [Cabin Number 2] ElseIf Event_List = "Event 3" Then Event_Name = [Event 3] PMT = [PMT 3] Receipt = [Receipt 3] Payment_Type = [Payment Type 3] PIF = [Paid In Full 3] Camp_Site = [Camp Site 3] Cabin_Number = [Cabin Number 3]
I am trying to see if it is possible to store colors in a form or table and then reference them while in VBA. What I am hoping to do is when I write all my code for command buttons to change On Got Focus, instead of writing xxx.backcolor = RGB (255,255,255) i could do something like xxx.backcolor = Forms!HiddenColors!Command That way if i want to ever change the color scheme of the db, I can change it in one place rather than hunt lines of code.
I have played around but with no success. Technewonline is a website that specializes in introducing the latest technologies such as Best Tablet Android Have Price Under $200 and Best tablet of Apple in 2014 and The Best Midrange Smart Phone In 2014 and Top Best Ultrabook Of 2014 and The Best Phones 4G Valued At Under 300 USD is also a website for sharing your tips about computers, mobile phones and tablets, products are available from leading supermarkets will surely satisfy you.
I have a form with two subforms (the second is the child of the first). I want to filter a combo box in the second subform using the record of the first as the filter.
When I open the form from the object list I get this '2455' error. When I press "end" and the form opens the requery does what I want it to do with no further error, using this code in the "got focus" event of the combo box in the first subform:
I have setup my main form with 2 subforms to mimic a split form; this works fine.
To search for a record, I am using a cbo on the main form which I would like the user to select from. Once selected, then this will populate the first subform.
This is the code I have for the cbo:
Dim intAnswer As Integer If IsNull(Me!cboCaseNoCFDWit) Then Exit Sub With Me!sfFocus.Form.RecordsetClone .FindFirst "Me!sfFocus.Form!CaseNumber = """ & Me!cboCaseNoCFDWit & """" If Not .NoMatch Then If Me.Dirty Then Me.Dirty = False
[Code] ....
I get an error at the .findfirst; states that the Microsoft Engine does not recogize Me!sfFocus.Form!CaseNumber
And the reason I am not using a regular split form is because I cannot, get the form to the size that I want. The splitform works great with the code above (a few changes to it of course), but the bottom of the splitform (datasheet) is too long and I cannot shorten it.