i am trying to open a form if all conditions are met. if the conditions are not met, then they get a flash message and then the user should return to the open form. i have the condition checking working but cannot seem to open the form if ALL conditions are true. i also need to close the form when the new form opens.how could i achieve this? here is my code
Private Sub MidVerifyContinue_Click()
FullNameChk.SetFocus
If FullNameChk = False Then
MsgBox "You Need to have a Full Name to Verify", vbOKOnly, "Message"
End If
If CompNameChk = False Then
MsgBox "You Need to have a Company Name to Verify", vbOKOnly, "Message"
End If
If TradeNameChk = False Then
MsgBox "You Need to have a Trading as name to Verify", vbOKOnly, "Message"
End If
If UTChk = False Then
MsgBox "You Need to have a number to Verify", vbOKOnly, "Message"
End If
If CRChk = False Then
MsgBox "You Need to have a C R number to Verify", vbOKOnly, "Message"
End If
If NIChk = False Then
MsgBox "You Need to have a N I number to Verify", vbOKOnly, "Message"
End If
If PostCodeChk = False Then
MsgBox "You Need to have a Postcode to Verify", vbOKOnly, "Message"
End If
I have a form that I created that allows the user to input an "ExhibitNo" and then a "PlacingNo" to allow each entry to receive a set monetary amount (based on values in a table).
The "ExhibitNo" has two references linked to it. They are "ClassNo" and "ExhibitorID".
My supervisors want me to make it so that when the "ExhibitNo" is entered on the form that it will not allow a monetary amount.
This is where I started, but it does not work. Does anyone have a better idea?
Private Sub Combo14_AfterUpdate() Me.Refresh If [ClassNo] >= 0 >= 5000 Then If [ExhibitorNo] <= 0 >= 499 Then If [Placinggrade] = "Blue" Then [Premium] = [Blue] End If If [Placinggrade] = "Red" Then [Premium] = [Red] End If If [Placinggrade] = "White" Then [Premium] = [White] End If End If End If
If [ClassNo] >= 5000 Then If [ExhibitorNo] <= 500 Then If [Placinggrade] = "Blue" Then [Premium] = [Blue] End If If [Placinggrade] = "Red" Then [Premium] = [Red] End If If [Placinggrade] = "White" Then [Premium] = [White] End If End If End If
If [ClassNo] >= 5000 Then If [ExhibitorNo] >= 500 Then [Premium] = 0 End If End If
What I need to do is, not have a form pop up when all the conditions are met. I have 30 some users that log into the db.
I have a form that pops up when the date of the project is past due. to certain users when they log in. I am using the Environ("username") theory, which works very well. But when the user has COMPLETED all the necessary dates, the form still comes up, (but of course it’s blank).
It's easiest if I take you through step by step. I open a form with a list of students and I have to enter the condtion for a Tutor Group (say I type in 13EN). The form then loads up with all students in 13EN. Then I have a 'Add Student' button which loads up a form with an indivudual students information qith a blank record. Then I press a 'Done' button which closes that form and requeries the Student List form.
My problem is when I requery the form I have to re-enter the condition for 'Tutor Group' i.e. I have to type it in again. Is there any way I can refresh the data from the conditions I have already entered (i.e. for the Tutor group, 13EN) without having to type it in again?
when i open a form i want to open another frm at the same time. i have a main form with some buttons in it. when i click on a button and a form opens then i am not able to click on a button to open other forms from the main form.
Is there a way to close a form that is open from another form that has the focus. I tried using the Unload event, but I received an error message "Cant load or unload the object". I would appreciate any help!
I currently have a query which takes its criteria from a form called search. This all works fine, unless the user leaves a field in the search form blank. Then the query has no results. What I'd like is for a blank field to act as a wildcard. I guess the reason this doesn't automatically work is that Access (effectively) puts " & " around the criteria taken from a form, so the criteria ends up as " " not (there's a space there!).
I tried entering a criteria in the query that says: IIF([Forms]![Search]![Date] Is Null,*, [Forms]![Search]![Date] this doesn't work. For one thing Access edits the * into "*", so it is no longer a wildcard. Secondly, I've never used IIF before, so it's probably wrong anyway...
So, can anyone help me do this? Even if a blank field cannot be used as a wildcard, any character would do...
Hope someone can help with this. Had a search through the forums but nothing quite the same (although I'm guessing it's a simple one to solve.)
I need to calculate a figure based on 2 criteria. The permutations are as follows
If condition A is less than 20 and condition B is No then return 9 If condition A is less than 20 and condition B is No then return 12 If condition A is greater than 20 and condition B is No then return 13 If condition A is greater than 20 and condition B is No then return 15
Hi, I have created a Yes/No attribute. Im just wondering if a text boxes visibility can be dependent on the result of this. E.g. If a row is set to yes then the text box will be shown and if it is set to no the text box is made invisible. Thanks for any help
Hi again :) Since I am new to Access I am having a problem figuring out how to set the participation conditions (optional or mandatory) for my relationships. I have looked through MS access online and forums, google etc. and found nothing. I would be very grateful for any help :) Kind Regards Marie
The following SQL statement with 1 where condition works fine, but the Next SQL statement with 2 where conditions does not work, a error message says Run-Time error ‘13’ type mismatch , what is incorrect in the statement when the AND MinID = 15 is added. The table data type in set as number
SQL = "UPDATE MinistryInv2 Set MinID = " & 14 & " WHERE PID = " & Me!ID & ";"
SQL = "UPDATE MinistryInv2 Set MinID = " & 14 & " WHERE PID = " & Me!ID And MinID = 15 & ";"
I have set up a querry that gathers information from different tables:
ID | Name | StartDate | EndDate | NbOfDays |
Then, i am using a form to fill up this querry. Normal stuff.
1- How and where can i set a condition so the input of EndDate could not be smaller than StartDate? 2- How and where can i set up and write the formula that calculates the NbOfDays? (meaning number of days worked form start date to end date)
I had two tables parent(f1) , child(f1,f2,f3). I had to display f3 value for parent(f1) when f1 has only one f2, if f2 values are more than one for single f1 and if all f3 values are 0 then i should display f3 as 0, else if some values for f3 are nonZeros and some are Zeros then is should display f3 value as '-'.
I am so frustrated right now that I could scream. I have a database which tracks attendance and referrals for a networking organization - it meets weekly on Thursdays. It has a report which displays totals of both attendance and referrals for each weekly meeting for an entire month. The problem I am having is related to the fact that some months have 4 Thursdays and some have 5. If I get my queries to display the meeting dates correctly for the 4-Thursday months, then it displays incorrectly for the 5-Thursday months, and vice versa.
Is there any way to put a criteria on a missing record? If I could have it just populate the 5th week with spaces or null when it doesn't exist for that month, it would make my life a lot easier.
I can send a copy of the database to anyone who thinks they can help. It's too big to post.
If the value is on field is say "OA" then I need an input code of LL0000 or LL00000 in the next field If the value is say "OT" then I need an input code of LL etc
I have a filed and I want to find out its length then in the next column i have to add the data like if filed 1's length is 1 then it should be 000+field1.value, if it is 2 then 00+field1.value, if it is 3 then 0+field1.value and so on...any help is appreciated , thanks
I'm trying to create an If/Then statement that needs to match to multiple values. My initial thoughts were to create a list but that doesn't seem to work the way I thought it would.
For example: If Me.Field = 1,2,5, or 8 Then Do 'X' Else IF Me.Field = 3,4,6 or 7 THen Do 'Y' Else Do 'Z'
I haven't been able to get the syntax to work right. I'd rather not have to do 'Me.Field = 1 or Me.Field = 2, etc.' but if that's the only way to have it work right, then I guess it'll have to do.
I am trying to calculate [current status] based on multiple conditions. for example
Current status = A , if (w>0 and x=0 and y=0 and z=0)
Current Status =B , if(w>0 and x>0 , y=0 and z=0) Current Status =C , if(w>0 and x>0 and y>0 , z=0) Current status =D , if(w>0 and x>0 and y>0 and z>0)
Where A,B,C,D are text values and w,x,y,z are dates
Basically I have a Customer Form, which I have a New party button on it,this button opens up the party form to a new party, what I would like it to do is open up a new party but make the new party for the customer I had selected in the previous form.I have tried the GoTo macro's but cannot seem to get it to work.
I am thinking on clicking the button it will need to get the Customer ID, and then open the party form, create new party, and paste in the Customer ID, which then updates the Name - Date - Address - Company Fields.