Please Correct This Statement

Mar 31, 2005

Dear All

It may be a very dump question but I can't get my head around it.

I have a MainForm and then a subform Form1 on it.

There is a command button cmd1 on subform Form1. Now I want to access cmd1 through another command button cmd2 on a different form Form2. How would I design the statement?

I have tried the followings on OnClick event of cmd2 on Form2

Forms!MainForm.Form1.cmd1.visible = true

Forms!MainForm.cmd1.visible=true

Forms!Form1.cmd1.visible=true

Forms!MainForm.Subform.Form1.cmd1.visible=true

Nothing works. Any suggestions?

Thank you

:confused: :confused:

View Replies


ADVERTISEMENT

Correct Join Type And Query Statement

Feb 7, 2006

I've been struggling with this for awhile now. I've been trying to research a solution but I'm not even sure what to search for.I have the following table structure:tblContactsContact_ID (PK)First_NameLast_NametblBidPackBid_Pack_ID (PK)Bid_Pack_DescriptiontblDistributionListList_ID (PK)Bid_Pack_ID (FK) (1-M)Contact_ID (FK) (1-M)What I would like to do is create a query to display all of the contacts from tblContacts that are not associated with a certain Bid_Pack_ID. My end goal is to create a form where I enter Distribution List Information. I want a listbox on the left with all of the contacts from tblContacts and a listbox on the right with contacts that have been selected for a particular Bid_Pack. When the user double clicks an item on the left it should show up on the right and be removed from the left. I'm looking for the same functionality as when you use the design wizard and you choose fields to include/exclude.For example, let's say I want to add contacts for distribution list "A". My thought is the box on the left would show all the contacts from tblContacts that aren't selected for distribution list "A" and the box on the right would show all of the contacts that are part of distribution list "A". As you double click an entry it would perform the appropriate record creation/deletion and each box would be required.So back to my original question, what is the correct method (relationship, join, querydef) to select all of the contacts from tblContacts that haven't been assocatied with a particular bid pack?Thanks for any help you can provide. Even a nudge in the right direction would be appreciated.

View 2 Replies View Related

Reports :: Changing Numbers To Correct Date Format - IIF Statement

Dec 17, 2013

How to get this expression to work? It works by changing the numbers to correct date format, however, if the field is null, I want a blank to appear instead of "type"

=IIf([DATE_APPLIED_X] Is Null,"""",CDate(Mid([DATE_APPLIED_X],5,2) & "/" & Right([DATE_APPLIED_X],2) & "/" & Left([DATE_APPLIED_X],4)))

Report.JPG

View 10 Replies View Related

Subform Correct Answer Adds To Number Correct In Main Form

Mar 2, 2012

The code I have is.

Code:
Private Sub Command26_Click()
If Forms![test site]![prp test].Form.[A Right Answer] = -1 Then
Forms![test site]![number correct] = Forms![test site]![number correct] + 1
End If
DoCmd.FindNext
End Sub

Then when clicked it checks a yes/no box to see if "A right Answer" is the correct yes. Then it should pop to the main form and take the number correct cell and add one to it. I am trying to get the record to go to the next record inside the sub-form but docmd.findnext seems to be wrong too.

View 4 Replies View Related

Queries :: Update Statement For A OUTER JOIN Select Statement

Feb 12, 2014

I have the following Select Statement:

SELECTTenant.ID, Tenant.[First Name], Tenant.[Last Name], Tenant.Address, Tenant.City, Tenant.State, Tenant.Zip, Tenant.[Home Phone], Tenant.[Cell Phone], Tenant.[Work Phone], Tenant.[Rented Unit],
Tenant.[Security Deposit], Tenant.[Move In], Tenant.[Move Out], Tenant.TenantID, Tenant.UnitID, Tenant.PropertyID, Tenant.OwnerID, Owner.Company, Owner.ID AS Expr1, Property.[Property Address],

[code]....

Now, I know that something in the UPDATE statement does not match my select statement.What should my Update Statement be, in order to update all the columns in the joined tables?

View 2 Replies View Related

Not Sure I Have My Relationships Correct...

Nov 10, 2005

Hi everyone,

I am trying to build a little shopping cart. I think my major problem is the relationships. I can't seem to get them right.

My major problem is adding items to the shoping cart (basket).
I guess 1 item can go in many baskets and a basket can hold many items. Make sense?
so i have my tblItem & tblBasket, and then I made another table called tblConnectBasketItem, which holds the itemid & basketid.

In any rate, this is where I got confused.

If someone can look over my DB, and give me some pointers, that would be great and thankfull.

You can find my DB attached.

Thanks again,
Sass

View 2 Replies View Related

Many-to-many Structure Correct?

Jun 11, 2005

I’m struggling to fix a database for my state agency. Here’s what the social workers need:

The agency holds several Foster Parent training sessions a year. Each session consists of 9 classes. We need to track ‘student’ attendance at each class. We also need to track class dates for each student.

The fly-in-the-ointment: ‘Student’ foster parents must attend the 9 classes, but they can fulfill this requirement over several sessions. They can take classes 1, 2 and 5 in Session 1, classes 3, 4, 7 in Session 2, and so on.

Here’s what I’ve created:

tblSessions
SessionID
SessionLocationkey ( to tblLocations; irrelevant to this post)
SessionStartDate
SessionName

tblClasses
ClassID
SessionIDkey
ClassTopic
ClassDate

tblAttendance
ClassID
StudentID

tblStudents
StudentID
StudentFirstname
etc.

The Attendance table is the junction table for the many-to-many relationship between Students and Classes.

Is this the correct structure? Thanks in advance for any advice. And thanks to Pat Hartman, The Doc Man, and SJ McAbney for getting me this far with the advice I found in researching this topic.

Sean

View 12 Replies View Related

Is The Design Correct For What I Want?

Apr 26, 2006

tblFAR
FarNumID (PK)
FarNumber
FarTitle

tblFarParagraph
FarParaID (PK)
FarNumID (fk from tblFAR)
FarParaTitle
FarParaText

tblAC
ACNumID (PK)
ACNumber
ACTitle

tblACParagraph
ACParaID (PK)
ACNumID (fk from tblAC)
ACParaTitle
ACParaText


1.Each FAR contains Many FarParagraph 1 to Many
2.Each AC contains Many ACParagraph 1 to Many
3.Each FarRParagraph contains Many ACParagraph
AND
Each ACParagraph contains Many FarParagraph Many to Many

What I’m trying to do:

FAR
Chapter 1
Paragraph a – Relates to AC Chapter 4 paragraph a1
Paragraph b – Relates to AC Chapter 4 paragraph a
Paragraph c – Relates to AC chapter 6 paragraph b

AC
Chapter 4
Paragraph a – Relates to FAR Chapter 1 paragraph b
Paragraph a1 – Relates to FAR Chapter 1 paragraph a
Paragraph a2 – Relates to FAR Chapter 6 paragraph c
Paragraph b – Relates to FAR Chapter 8 paragraph d

I’m not sure if my design is correct for what I want.
BTW -- AN "AC" and "FAR" are just a type of document.
Thanks
Paul

View 1 Replies View Related

Getting Correct Output

Jun 29, 2005

Hi guys,

Attached is a real simple database. What I want to be able to do is insert new payment details, and I have a couple of issues.

I have two clients and need to be able to select which client I want, select the payment details from the drop down list and enter in some appropriate amount.

Its been a while since I've created a db from scratch so this is obviously where I am having my difficulties. However I think I need to use a sub form.

How can I input the details as above, and how can I always get the combobox to default to the first entry in the list rather than defaulting to zero?

Thanks for the pointers.

View 3 Replies View Related

Correct Syntax

Oct 11, 2004

End result query example:

Between #10/15/04" And #10/15/04# - 6
Or the date range of 10/10/04 through 10/15/04

This would be in a query under the Date field

What is the correct syntax? Please include
() and # signs where they need to be.

Thank you.

View 1 Replies View Related

General :: Zero Value Is Not Correct?

Sep 2, 2014

I have a form that should give me all values below " 0" but I am getting zero

but when I click on that value I see this

-1.52587890625E-05

View 3 Replies View Related

Queries :: IIF Statement With And In True Statement

Oct 31, 2014

I have a query with the following criteria in one of the fields:

>=DateAdd("m",-12,fom()) And <=DateAdd("m",1,fom())

fom is a function for first of the current month. I need this query to be specific to what month it is when its ran so i want to only have this criteria if the month is > = october. If it isnt October or greater, i want the criteria to reflect this.

>=DateAdd("m",-12,fom()) And <=fom()

Which also works by itself. But when i add it to an iif statement it always produces no results. Below is the iif statement.

Iif(month(date())>=10, >=DateAdd("m",-12,fom()) And <=DateAdd("m",1,fom()),>=DateAdd("m",-12,fom()) And <=fom())

I have also added the column name to each expression and it still doesnt produce any results.

View 4 Replies View Related

Creating IIF Statement In Between Statement For Dates?

Apr 28, 2015

I am creating a multi-search form for a student database, where after I enter my search criteria I hit a "Run Query" command button and then it opens a query form with all of my criteria.So far I can search using last name, first name, and middle name. When I try to search with a start date and end date I am have issues.The start date and end date is for the class date. In the query form under the field, class date, for criteria I wrote:

Between IIf([Forms]![Search Form]![Start Date]="",1/1/10,[Forms]![Search Form]![Start Date]) And IIf([Forms]![Search Form]![End Date]="",4/25/15,[Forms]![Search Form]![End Date])

I want it when I write a date in the start date and end date I want it to give me a list of all the students who took the course between those dates. Also, if I leave the dates blank I want it to search all dates. The dates 1/1/10 and 4/25/15 are just the dates I gave because that is far back as my database goes.

View 11 Replies View Related

Selecting The Correct Table

Mar 10, 2006

I have an order table and depending on the the product grp it needs to then be able to select the appropriate size scale table.

e.g.

I order suits, and select a size grade A ( there are 7 size grades ) I then then to enter the size scale for that product. I am not sure whether to create 7 differant tables with the different size grades and link that to the table, if so how do i get it select the correct table.

please help...

H

View 1 Replies View Related

Selecting The Correct Table

Mar 10, 2006

Selecting the correct table

--------------------------------------------------------------------------------

I have an order table and depending on the the product grp it needs to then be able to select the appropriate size scale table.

e.g.

I order suits, and select a size grade A ( there are 7 size grades ) I then then to enter the size scale for that product. I am not sure whether to create 7 differant tables with the different size grades and link that to the table, if so how do i get it select the correct table.

please help...

H

View 2 Replies View Related

Correct Relationship Setup?

Jun 14, 2006

Hi all..

I have a simple database setup...

When I do a test query on the tblMain.. all I get are numbers.. How do I change the numbers to text?

Thanks again
R~

View 2 Replies View Related

Is Select Case The Correct Way To Do This

Mar 14, 2008

I wonder if any one can help with this one, shown below are 2 examples of strings in a field called PROCOM



Occurred: EnterMeterReadings; Reason: Reading greater than upper limit; Session: 0A52BE4293.worker1

MSPSubmitMeterReadings; Reason: CANNOT BILL LATER THAN 29/02/08, DATE AMENDED FROM 13/03/08

I ususally nest IIf statements to abbreviate these in another field (PROC), as PROC: IIf ([PROCOM] like Occurred: EnterMeterReadings; Reason: Reading greater than upper limitMRE-Upper limit",[PROCOM])

The problem I have is there now 30 permutations of the error and IIF can only nest 8 statements (and it looks very messy). I thought that Select Case would do the job but I cannot use

Select Case

Case Is Like "Occurred: EnterMeterReadings; Reason: Reading greater than upper limit*"

Hope someone can help with this one

Thanks in advance

View 8 Replies View Related

Correct Order In Combo Box

Mar 3, 2005

Very simple question:

How do I make the results of a query which I am displaying in a combo box appear in order.

e.g. 1 then below that 2 then below 3 then below 4 etc

even though I may have entered the details in a different order. I've tried doing it order by ascending and decending but this doesn't work.

Many thanks

Paul.

View 1 Replies View Related

My IIF Is Superlong...is My Syntax Even Correct?

Feb 2, 2006

This is what I'm trying to fit into the control box. Maybe there is a much better way to do it so suggestions are very welcome. I don't know if I can even use "!" in the IIF statement. And I think it's too long, so it's invalid.

What I'm trying to do is to check if all those fields are passing (or NOT failing). Then insert "Yes" or "No" into a textbox.

----------------------------------------------------------------
Code
----------------------------------------------------------------

IIF(blackStartPlans!=”fail” and operatorTraining!=”fail” and telemetryAvailable!=”fail” and backupControlCenter!=”fail” and vegetationManagement!=”fail” and capacityEmergencies!=”fail” and cat_A_contingency!=”fail” and cat_B_contingency!=”fail” and cat_C_contingency!=”fail” and cat_D_contingency!=”fail” and electricityFacRating!=”fail” and relayMaintenance!=”fail” and UFLS!=”fail” and UVLS!=”fail” and Other!=”fail”, “Yes”, “No”)

View 5 Replies View Related

Dsum (Not Appear Correct Calculation)

Aug 16, 2006

first of all sorry to my poor English

I have subform of inventry Transaction there are field productId, UnitsSale, SalePrice

I am using combo box on productId and want to calculate When i change productId (Stock in hand to show on msgbox) for the productId which i choosen from combo box


if any one know about it please help


Baig

View 1 Replies View Related

Desperate - With Correct Attachment

Nov 14, 2006

Sorry...attached the wrong file. Here it is again.

View 4 Replies View Related

Selecting One Record To Correct

Mar 1, 2007

OK, my database is also complete, thanks to the help of this forum!!!

My next question is:

I have a switchboard that has a button for my data entry form. The lady that will use this form will, of course, enter all her records using the form into the database. Because of what she does, she will have to go back to records on a daily basis to make corrections to individual records. I would like a way to put a command button on my switchboard that will say something like "Correct Records". She will hit this button and it will ask her for the medical record number she wants to correct and then will take her to that record to correct.

Is there a way to do this or is there a better way? Currently I have a button that will ask for a day range and then will bring up a query of those records for her to correct but I would really like to be able to somehow bring up the individual record, by medical records number, for her to correct instead of going through a long list of records that were input on a single day. Thanks so much for all your help getting this thing up and running!!!!

View 4 Replies View Related

Query Not Returning Correct Results

Jul 3, 2006

Hi everyone,

I'm having an issue with a query I created. When run the query requests an Artist Name. I enter this and it returns one result. However in actual table ther are two results for that artist. The only difference is that for the record that doesnt appear the field labelled "Gallery" has a zero value.

I have checked the table and the gallery field is not set to a required field so I dont understand why it wont show it as a result of the query.

Any ideas?

View 3 Replies View Related

Display Form Correct With Different Resolutions

May 9, 2006

One of my probs with access is changing the form when a different resolution is being set.
Is there a visual basic module or something else to display the form properly dependent of the selected resolution?

View 1 Replies View Related

On Load Event Not Working - Is This Correct?

Jul 15, 2007

Hope I explain this clearly -

I have a combo box with four choices. I then have four labels.
If i select A in the combo box i want LabelA to show up, B in combo box Label B (but not Label A) and so on.

I have set the property for all labels to (not) visible.

Then on the combo box I have put
(On Click) event if cmboxx is "A" then
me. label A.visible = true else me.label A.visible = false end if.

This works fine if I am entering a new dataset but when I exit from the database and then go back in, the label is not visible.
I have tried entering the code in the OnLoad event of the form but that doesn't work. Any ideas?

Also - if the combo box also has its selection made before I enter this code then the label is not visible until i go back and re-enter (ie" click) it. Any ideas

View 3 Replies View Related

Modules & VBA :: Why Isn't Enum Returning Correct Value

Aug 7, 2014

I am using MS Access with SharePoint Lists and some Access Tables to generate reports in pre-formatted MS Excel Worksheets. My main module opens several classes. One of the classes receives a worksheet to keep in a historical book. This class can receive any one of several different types of pre-formatted worksheets. After all is said an done the class adds a cover sheet to the consolidated workbook and adds hyperlinks to the other sheets, kinda like a table of content.In the class I have the following in the general declaration.

code:
Public Enum BookType
A = 1
B = 2
End Enum
Private pBookType As BookType

Later in the class I have the following:

Code:
Public Property Let LoadBookType(ByVal btNewValue As BookType)
pBookType = btNewValue
AddWorkBook
End Property

in the main modual I have the following

Code:
classConsolidated.LoadBookType = A

When assigning the above property it passes in "11"

if I change it to the following

Code:
classConsolidated.LoadBookType = BookType.A

it passes in "1" as I expect and use in a Select Case statement later in the class.So why does one pass in "11" but the other passes in "1"?

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved