Got The Code, But Can't Make It Run
May 15, 2007
I'm having a total brain freeze here.
Last week, I posted for help getting an email (with attachments) sent from inside an Access database.
With some help from my friends here, I fought through the issues and got the code in the module to work, when tested from the immediate window.
Problem is, I can't figure out how to tie it to a macro or event or anything else that will let me push a button and have it run.
I need nuts and bolts details--- how do I run this module?
BeckieO
View Replies
ADVERTISEMENT
Nov 26, 2012
Would it be ok just to make a copy of the BE file (every so often) rather than to make a copy via code?The user can then just paste over the original if it becomes corrupt.
View 4 Replies
View Related
Mar 24, 2007
i am sorry
im new using access
how can i make a table with code? and how can i create relationship between tables with using code?
View 1 Replies
View Related
May 26, 2005
I am wondering if anyone can recommend shareware or free ware Utilities/code to make Form & Report Creation/Edits easier?
I'm thinking of something like Cub Editor http://www.peterssoftware.com/ce.htm or SmartForm+ http://www.aadconsulting.com/smtfrmplus.html
but alas .... I can't do anything that will edit the registry (company politics says Access and it's Wizards is plenty 'perfect' http://www.dbforums.com/images/smilies/frown.gif maybe I will convince the powers that be but not in short time)
Also the code (or forms / reports built) need to work on Access 2000, 2002 and 2003. or well-commented on how to modify as I'm only modest with writng VBA code.
Any ideas? Thanks!
Mark
View 1 Replies
View Related
Apr 5, 2013
First query = Sum Products:
Code:
SELECT Sum(Tab1.Inputs) AS SumOfInputs, Sum(Tab1.ValInp) AS SumOfValInp, Sum(Tab1.Outputs) AS SumOfOutputs, Sum(Tab1.ValOut) AS SumOfValOut, Products.Product, Products.VAT, Products.UM
FROM Tab1 INNER JOIN Produse ON Tab1.ProductID = Products.ProductID
GROUP BY Products.Product, Products.VAT, Product.UM, Tab1.ProductID;
Second query :
Code:
SELECT Nz([SumOfInputs],0)-Nz([SumOfOutputs],0) AS Stoc, Nz([SumOfValInp],0)-Nz([SumOfValOut],0) AS ValStoc, IIf([Stoc]=0,0,([ValStoc]/[Stoc])) AS CMP, [Sum Products].Product, [Sum Products].SumOfInputs, [Sum Products].SumOfOutputs, [Sum Products].SumOfValInp, [Sum Products].SumOfValOut, [Sum Products].VAT, [Sum Products].UM
FROM [Sum Products]
GROUP BY [Sum Products].Product, [Sum Products].SumOfInputs, [Sum Products].SumOfOutputs, [Sum Products].SumOfValInp, [Sum Products].SumOfValOut, [Sum Products].VAT, [Sum Products].UM
HAVING (((Nz([SumOfInputs],0)-Nz([SumOfOutputs],0))>0.09 Or (Nz([SumOfInputs],0)-Nz([SumOfOutputs],0))<-0.09));
I need to combine those two query sql code to make only one query.
View 3 Replies
View Related
Aug 17, 2006
Hello buddies :D, do you have any idea how to make this work?
To select data that falls within this criteria of date range between cboDate and cboDate2 (fields on my form). The date in [tblJobDetails]![timeIn] come in this format "08/17/06 10:24 AM", but the cboDate/cboDate2 (takes in date only e.g 08/17/06) what i am after is to evaluate specific hard coded time in addition to the date entered, i.e. even tho, i haven't entered time on the cboDate/cboDate2, I want specific time hard coded where e.g If i select a date range of 08/17/06 and 08/18/06 on my cboDate and cboDate2 it should really be evaluating: 08/17/06 8:00 AM to 08/18/06 8:00 AM.
This is the criteria i curentlly have on my query in design view tha works perfect in selecting date only.
([tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Or [tblJobDetails]![timeIn]>=[Forms]![frmPendingJobs]![cboDate] Is Null) And ([tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Or [tblJobDetails]![timeIn]<=[Forms]![frmPendingJobs]![cboDate2] Is Null)
How can I incorporate 8:00am to 8:00am into my cboDate and cboDate2. What can i do to make this happen? Your kindness will be greatly appreciated http://www.naijaryders.com/forums/images/smilies/thankyou.gif
View 10 Replies
View Related
Sep 25, 2006
I'm currently working with a form, which is in datasheet view. I have many rows which are combo boxes (yes/no), and the name is rather long. So each line (each row) spreads on to 2-3 pages to the right.What I would like to do is make the namebar, on top of every column, a little bit higher, so the name would be split into two lines, or three. Allowing me to make the width allot smaller.Here is an example of my problem:http://213.213.137.96/~terminal/columns.jpgSo my question is, can I change the height of the column name? Or is there some trick I can use?regardsFrímann Kjerúlf
View 1 Replies
View Related
Feb 16, 2006
Works great, but when I hit the number "3", (3 times in row) it will let me into the form. I want it to not let me in IF I don't know the password.
Where did I go wrong?
Private Sub Form_Load()
Dim pw As Variant
If InputBox("What is the password?", "Password") = "1" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
If InputBox("What is the password?", "Password") = "2" Then
Else
MsgBox "Invalid Password", vbCritical, "Sorry Charlie"
DoCmd.Close
End If
End If
End Sub
View 14 Replies
View Related
Jan 14, 2007
I protect my code from people being able to read it by setting a password on the code from Tools > Properties, selecting the Protection tab and entering a password, and clicking "Lock Project"
Is there a way to write code that will remove that Lock Project check and check it back on?
I've looked through the Application.SetOption command and it doesn't seem to be one of the choices. It would be very helpful if someone knew how to do this.
Thanks
SHADOW
View 6 Replies
View Related
Jun 8, 2005
Hey guys.. I am trying to make my DB into an MDE file however that option which is in Tools > Database Utilities is not highlighted on this particular database. Anyone know why? Thanks!
EDIT - This features seems to be inactive on all atabases on my computer (I haven't tried another computer yet). I am using Access 2000 and running Win XP Hme. SP1.
View 6 Replies
View Related
Jul 15, 2005
I'm trying to make and mde file but when it runs I get a error unable to make mde. Where do I start looking into this?
Jon
View 1 Replies
View Related
Oct 15, 2005
Hi all
in the attachment there is two pictures for a form with interesting calendar to chose DOB
any one know how to do something like it
Thx
View 5 Replies
View Related
Jun 25, 2006
Hi
I'm making my first commissioned database and I can't get my head around auto-lookups.
At the moment, I'm only working with tables because I want everything properly formatted and working at the table stage before I move on to making my forms, queries, reports, and eventually the switchboard.
What I want to do is when I call up a particular ID number in a table which has corresponding data in another table, I want the corresponding data, such as names and phone numbers, to come up automatically within the table.
My database has about eight tables in it and all are linked in someway, either because I need to create lookups, or because they will eventually be subforms.
So what I need is for someone to explain an easy way to get the tables to do what I want. I've looked up the Dlookup function in Access Help but it didn't make sense :confused:
Can someone help me please? I would REALLY appreciate it.
Thanks.
B-E
View 1 Replies
View Related
Apr 17, 2007
Hello!
In my form I have the title of a CD which is under the name of 'CD_Title' which is taken from my CD's table and I was wondering how to show it up in a Label so when I flick through the albums the Label changes to the album that it is selected!
I need to know...please help me!
:(
View 3 Replies
View Related
Jul 19, 2007
Being an Access newbie and all I knew nothing about the maximum number of TableIDs being 2048...really I just found out about TableIDs when the error message popped up. :o
Is there a way around this, short of revamping the entire database?
View 2 Replies
View Related
Dec 28, 2007
Hello all,
I have a front end/back end app in AccessXP/Sql Server. I have a master version of the front end on my pc, and each user has a copy on their pc.
Everything works fine. I wanted to go the last step in securing the project, so I converted to an MDE. Now, on some of the other PC's, any field in a form that has "NOW()" as the default value (unbound fields) displays the #NAME? error.
Any idea why it would work fine in a .MDB, but not in an .MDE?
Thanks
Mark
View 7 Replies
View Related
Dec 22, 2005
I have 3 tables with which i want to extract columns from each of them and place them into a new table. The problem i have is that none of the tables share a common member. each table contains the same amount o rows spo when outputted to the new table will match up
View 1 Replies
View Related
Jan 31, 2007
Howdy all,
I'm attempting to set up a junction table.
The help for junctions says to make a compound key in the junction table, but I don't understand the intructions for this. Do they mean make all three of ID's the junction table PK's or is there a literal "Make a Compound Key"
button somewhere?
Currently, the table has an AutoIncrementing field as the PK and the two FK's copied in from the Primaries (converted from Auto to Number). As a result, I can only make one-to-one relationships to the junction table.
Please let me know what it is I am missing here.
Thanks
View 4 Replies
View Related
Apr 9, 2007
Hi
How to create new table from other with vba when the one table has records and the key record must be transferred to the new table.
Thanks
View 2 Replies
View Related
Aug 10, 2005
I have this query:
SELECT testScreen, Count(ID) AS testCount FROM SERPTestInput GROUP BY testScreen
It returns a count for each testScreen that appears in the table.
Then this query returns the same thing except it joins another table and adds the criteria that the status for the record must be successful.
SELECT testScreen, Count(testID) AS myCount FROM Results RIGHT JOIN SERPTestInput ON (SERPTestInput.ID=Results.testID AND Results.testStatus = 'Successful') GROUP BY testScreen
So both queries currently generate an 8 row table with the first column being the testScreen and the second being a count. I would like to somehow combine the two so I get a three column, 8 riow table. Column 1 would still be the testScreen, column 2 the total count for each testScreen and column 3 would be the successful count for each test screen.
In short, can the above two queries be combined into one?
View 4 Replies
View Related
May 15, 2006
I have a little problem with making a query and would need your help.
I have the following temporary table that gets filled automatically with 2 records every day:
DATE | TIME | NAME | CODE
The first record will have the DATE, TIME, NAME ( always the same ) and the CODE that can be START or STOP.
What i need, is to put the 2 records from the same day in a single row to get something like that:
NAME | DATE_START | TIME_START | DATE_STOP | TIME_STOP | NAME
Until now i was able to make 2 different queries. One can give me the START info's, the other one the STOP info's.
My question is if there is a possibility to combine those 2 queries or to make one query to get the result i need.
View 2 Replies
View Related
Aug 11, 2006
if i do 2 at a time it wont work
but 1 at a time works, why is that?????
insert into room values ('00012','1A','B','120','00002','Sports Hall','N','0');
insert into room values ('00013','1B','B','20','00002','Changing Rooms','N','0');
Somebody please give me an answer
View 1 Replies
View Related
Nov 2, 2006
Hi again everyone,
I'm stumped again.
I have two tables that my query is looking at.
1. tblProgramActByDay
And the other is:
2. tblProgramByProductByDay
I’m trying to tell the query to
A: Look in the Program ID Field
B: if the Program ID Field = 1667100
C: Go to the table tblProgramByProductByDay
---- In that table look for the criteria---
The Field Program ID must = 0
The Field Product ID must = 38648800
The Field Locale must = en_US
The Field Report_Date must = The Current Month
If it does
Total the amount in the Sales Field from the table tblProgramByProductByDay
If not
Take the total sales for the current month from the table tblProgramActByDay
View 1 Replies
View Related
Oct 31, 2007
I have 2 tables: first table has 4 columns:
/job code/project1/project2/project3/
job code is some digits, and in next columns are the job description (different for each project).
The second table has
/project name/job code/description/working hours/date/
I made the query what shows how many working hours was consumed for each project monthly
and my working codes, but I would like to have job descriptions after job code, If its project1
then the description should be taken from first table from the column "project1". Is it possible to do it with
query?
View 1 Replies
View Related
Apr 22, 2005
I belive I have done this before but I cant remember how!
I have a continuos form with two text boxes on it and a check box.
I am trying to say if text box1 = "1" then text box 2 is visible if text box 1 = 2 then text box 2 is invisible. I am doing this on a tick box (for other reasons) so my code looks like this:
If Me.Text1 = "1" Then
Me.Text2.Visible = True
End If
If Me.Text1 = "2" Then
Me.Text2.Visible = False
End If
It works, kind of. The trouble is because its a continuous form all the Text2 boxes become visible or invisible depending rather than just the one record i'm working on. Is there a soloution to this?
View 1 Replies
View Related
Aug 30, 2005
I haven't used Access in a looooong time and building a document tracking database for work. I am setting up my data entry form and would like to have a text box appear depending on the selection from a combo box. So, if the user selects "In Review" a text box will appear for entry of the reviewer's name, likewise if the user selects, "In Work." In the other cases (options in the combo box) the document is not being revised, so no name needs to be entered--so no need for the additional text box. Make sense? Any guidance/advice as to how to go about this? Thank you!
View 3 Replies
View Related