Go Back   Access World Forums > Search Forums

 
Showing results 1 to 25 of 500
Search took 0.20 seconds.
Search: Posts Made By: Gasman
Forum: Reports Today, 09:42 AM
Replies: 2
Views: 37
Posted By Gasman
Re: Printing by use selected flag

Try

WhereCondition:="PrintFlag = True"


HTH
Forum: Modules & VBA Today, 08:35 AM
Replies: 14
Views: 193
Posted By Gasman
Re: File copy problem

https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/option-explicit-statement

Also DIM your variables with the correct type


Dim Files, Folderpath,...
Forum: Forms Today, 07:29 AM
Replies: 19
Views: 193
Posted By Gasman
Re: Dloookup with Table name is from a textBox

You are making the budgetyear a text doing what you are doing there.

Use
"budgetyear = " & [txtbox]
Forum: SQL Server Today, 05:37 AM
Replies: 6
Views: 192
Posted By Gasman
Re: multiple inner join

Nor is it in Access

select * from emails em where em.id = 22
Forum: Forms Today, 05:27 AM
Replies: 19
Views: 193
Posted By Gasman
Re: Dloookup with Table name is from a textBox

You can use as many criteria as you wish I believe, you just have to get the syntax correct.

What error are you getting as what you posted there is incorrect, no closing ] for the first parameter.?
Forum: Forms Today, 02:51 AM
Replies: 19
Views: 193
Posted By Gasman
Re: Dloookup with Table name is from a textBox

You keep changing the Dlookup criteria :banghead:

You do not even have the Year in there now.:confused:

Please the supply the whole Dlookup as YOU ARE USING IT NOW

Also supply what it...
Forum: Forms Today, 02:31 AM
Replies: 19
Views: 193
Posted By Gasman
Re: Dloookup with Table name is from a textBox

Well for a start if you want to change the possibility of getting a null value from the dlookup and replacing it with 0, you need to surround the whole dlookup with the Nz function.?

Let's get one...
Forum: Forms Yesterday, 11:29 AM
Replies: 19
Views: 193
Posted By Gasman
Re: Dloookup with Table name is from a textBox

What does


=DLookUp("[Bdgt Aam_Amd]","[tbl_Budgets17-18]"," [BudgetYear] = 2018")


give you?
Forum: Forms Yesterday, 11:14 AM
Replies: 19
Views: 193
Posted By Gasman
Re: Dloookup with Table name is from a textBox

Why do you use " for the first DLlookup for field and source, but not for the other?
Forum: Modules & VBA Yesterday, 09:47 AM
Replies: 14
Views: 193
Posted By Gasman
Re: File copy problem

Yes, it is time to give back :D
Forum: Modules & VBA Yesterday, 09:00 AM
Replies: 11
Views: 150
Posted By Gasman
Re: Attaching TWO reports into email

And the variable name for the second file?
Forum: Modules & VBA Yesterday, 08:59 AM
Replies: 14
Views: 193
Posted By Gasman
Re: File copy problem

Brilliant spot psyc0tic1 :cool:

Which explains why .txt files and others worked.:)
Forum: Modules & VBA Yesterday, 07:56 AM
Replies: 11
Views: 150
Posted By Gasman
Re: Attaching TWO reports into email

Almost :D

If you do not put .pdf extensions on the filenames, the recipient will be asked what program to use to open the files.?

Also you are overwriting the first report with the second...
Forum: Modules & VBA Yesterday, 07:49 AM
Replies: 14
Views: 193
Posted By Gasman
Re: File copy problem

Something wrong there.

To debug print.
Open the code window (Alt + F11)
Make sure the Immediate window is visible
Locate your form and then the sub in the form
Add

Debug.Print
Forum: Modules & VBA Yesterday, 06:20 AM
Replies: 11
Views: 150
Posted By Gasman
Re: Attaching TWO reports into email

I think you'll find that you need to save them as files first to do this.
Forum: Excel Yesterday, 02:31 AM
Replies: 1
Views: 198
Posted By Gasman
Re: Range help

Use the macro recorder to get the basics, and tailor to suit.

That is how I tend to do something like this, plus a bit of googling.
Forum: Forms 11-12-2018, 03:36 AM
Replies: 3
Views: 96
Posted By Gasman
Re: Selective Emails Condition

I would probably do it like this.
Have a table with the Logon categories and the admin email address for that category.
Loop through the controls for those categories (perhaps use a value in their...
Forum: General 11-11-2018, 01:49 PM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Especially if you can ensure it does not return any records? using the autonumber field and zero.?

I also tested my theory of EOF and BOF being checked together, where I have seen tests for both...
Forum: General 11-11-2018, 01:32 PM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Ok, to avoid confusion, I created the sub below and then ran it.
The last set does not allow access to the ID field as no current record, but in this thread, that did not matter as we were adding a...
Forum: General 11-11-2018, 07:17 AM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Cronk,

I have just used

Set rst = db.OpenRecordset("transactions")

and whilst it returned the number of records in the table without a movelast, when I debug printed the ID, it returned 1,...
Forum: Modules & VBA 11-11-2018, 04:33 AM
Replies: 3
Views: 89
Posted By Gasman
Re: send file by mail VBA

Replace .Send with .Display
Forum: General 11-10-2018, 09:57 AM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Doc_Man,

You are up on these things though.
If Access cannot recognise that the WHERE condition will always be false, then it will look through the whole recordset anyway? The only time saving...
Forum: General 11-10-2018, 08:43 AM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Complete Records

Sub TestRecordset()
Dim db As Database
Dim rst As Recordset

Set db = CurrentDb
Set rst = db.OpenRecordset("transactions")
rst.MoveLast
Debug.Print rst.RecordCount
Forum: General 11-10-2018, 07:02 AM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Yes, but at that time I was *thinking* that one needed the records for a particular ID?, the normal situation.

Then I realised that you were just doing it to get the structure of the recordset,...
Forum: General 11-10-2018, 06:28 AM
Replies: 25
Views: 359
Posted By Gasman
Re: Books don't alway tell you everything!

Wouldn't that really depend on what that query does?

For instance that criteria could already be in that query, or be using a form control on the form you are executing that code from.?

Is this...
Showing results 1 to 25 of 500

 
Forum Jump



All times are GMT -8. The time now is 12:09 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World