Linney, Thanks very much for this tip!!
I used to work on a Win2k machine and I switched to WinXP a few days ago.
Was very pissed when I noticed that I couldn't reach the security tab. Spent an hour on the MS-site yesterday, but good old Tek-Tips via google gave me the right answer.
In your Sub you try to evaluate the variable Field of type String. As far as I know a String cannot become a Null.
A control, like Me!AuthorizationNumber can.
Try:
Dim Check As Boolean
Check = IsNull(Me!AuthorizationNumber)
The function IsNull returns a true or a false. True if...
Hold the [Shift] key at start-up and hold it till your DB has fully appeared.
If there's for the rest no other security on your DB, this should work.
Good luck, Bart V.
This certainly helps. I think PurchaseOrderID either:
- doesn't exist yet;
- is not known to the form yet;
Is PurchaseOrderID the autonumbering field of your table (the table being the recordscource of your form)?
The event Form_Current is raised when:
- you switch to another record;
- when you...
Accessgebruiker,
I don't see any strange things in the lines of code in you reply.
Perhaps you could replace
DoCmd.GoToControl "PurchaseOrderNumber"
by
Me!PurchaseOrderNumber.SetFocus
PurchaseOrderNumber should be the name of the control on the form you want to move to...
Deleting the complete content of a table could be done with the following.
Public Function DelTable()
Dim StrSQL As String
StrSQL = "DELETE [Cache].* FROM [Cache];"
'Remove all of the records in table Cache without warning
DoCmd.SetWarnings False
DoCmd.RunSQL StrSQL...
Do you mean that you have a calculated field in your query (being the recordsource of your form)? And that you try to add a criterium to this calculated field?
(I don't understand what you mean with 'The field itself is from a lookup table used in the main table')
If so, I'm afraid that the...
I've experienced the same problem a few years ago, This problem is why I'm programming in VBA nowadays. Most likely, your VBA code in your Access 97 database declares recordsets in a way that's no longer compatible with Access 2000. My Access 97 DB was originally made with even an earlier Access...
What type is the field where you add a criterium? Is it of type Integer or of another numeric type? If so, a criterium Like "* . . ." won't work. This one only works for fields of type alphanumeric (text). Try the criterium >0
Another thing I'm thinking of is: is more than one table...
The criterum (in your query) Is Not Null should do the job.
A Null means: points to nowhere. A Null is not the same as an empty string, being "".
Good luck, Bart Verlaan.
The navigation properties record number is arbitrary and always depends on the possible way you sort your records. The total amount of records, seen in you navigational properties record number will always depend on the possible filter that you apply. I've never seen a way to put the navigation...
Yes, I think you're in the right direction. Open forms can are members of the Forms Collection and can 'see' each other. That wat you want will take some programming. Perhaps the Access build-in wizards can do the basic programming for you.
The Sybex Access 2000 VBA book taught me all I know...
It seems as if every time you reach the line rs2.open sql,currentproject.connection, a new connection is made.
Put a command line above the outer loop that says:
Set cnnDb = currentproject.connection
Replace rs2.open sql,currentproject.connection by rs2.open sql, cnnDb
Then rs2 points every...
The only thing I can think of is: the field you write to in the table is of type numeric. It's impossible to write leading zero's to a numeric field. Access probably translates your input (from a form?) to a valid long integer.
Do you have access to the table? If so, check the field type...
My impression is that your wishes ar too diverse to put it in one query. My advise: start programming. Create recordsets (i prefer ADO recordsets) and loop through the recordsets that you create. Decide what to do with a certain record, depending on the value of fields that you evaluate. If...
Hi Sirkenj,
I'm not sure if you can call a public function in a calculated field of a crosstab query, but it could be worth the try.
Building a public function would give you more control. Perhaps even if an error is raised you can give back a value to your query. The public function could look...
Hi Tjisaacs,
Formatting a date-field in a query works like this:
SELECT Format([TabelName]![FieldOfTypeDate],"dd/mm/yyyy") AS FormattedDate, ' other fields needed'
FROM . . . . . etc.
"dd/mm/yyyy" would become for example 01-02-2002 (february 1st, 2002.
Look in VBA Help...
I took a quick glance at your code. The first search-part I don't understand. I don't understand the meaning of your search.
But why do you use Documents.Add? As I understand the Word template already exists. Why don't you use Documents.Open. I must admit, I never tried this command on a Word...
ps, you must have Windows Scripting Host installed on your computer. Otherwise the function won't work. I know this is a security risk, but I don't know another way to get access to the filesystem.
Bart V.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.