Are you running your code live? If so, there will be no object context.
In order to work in debug and in production, always use the following syntax with ObjectContext:
Dim ctxobject As ObjectContext
Dim objAccount As Object
Set ctxobject = GetObjectContext()
if ctxobject Is Nothing then...
To create the folder, use the FileSystemObject GetFolder and CreateFolder methods.
dim strPath as string
const strDrive="c:\"
strPath= strDrive & txtClaim.text
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateFolder(strPath)
...
NO, data will not automatically transfer from one database to another!
1) If you are updating the code elements and maintaining the same database (and they are not the same file, e.g. a single Access database with both forms and data):
When you install a new version of your program, you also...
Your code is fine. However, it is writing the value into the Immediate window, and you can't see the window unless you switch back to the IDE and open the immediate window (from the View menu) while the program is still running.
If you want to see the result from your executable window, either...
...once:
Dim iDoc as Integer, iPic as integer
Do While objRS1.EOF <> True
MyPic = UCase(objRS1("Description"))
If MyPic Like "*JPG" Or MyPic Like "*BMP" Or MyPic Like "*GIF" Then
Image1(iPic).Picture = LoadPicture(objRS1("Description"))...
The following will work if there is always a record in plan matching the record in grantz. If not, change the word INNER to LEFT OUTER.
Change your FROM clause as follows:
JPMC37014.dbo.grantz grantz
LEFT OUTER JOIN JPMC37014.dbo.exercise exercise ON
grantz.GRANT_NUM =...
I think you have to do it with a cursor and a temp table. Retrieve all the machine numbers into your cursor, loop through it to append the top 15 rows for that machine. Then select * from the temp table.
Try this. It looks simpler:
Select A.Name, A.Points, A.Year
From tblPoints A
Inner Join (Select Max(Points) As MaxPoints, Year
From tblPoints
Group By Year) B
On B.MaxPoints = A.Points And B.Year=A.Year
Order By A.Year
If...
The indefinite hang-up in your first message was probably caused by attempting to return a recordset from an update query. Update queries don't create recordsets.
Is your table indexed on the fields in the where clause? You didn't say how long it takes to update the table if only one PC is...
Better yet, why not normalize your data? Create a new table, with fields FishId, MeasurementType, and FishLength.
(MeasurementType will identify the 4 columns you used in your current table).
Then all you need is a simple update query with a select max(FishLength).
@@error is the value returned by the system from the previous statement. You don't set it. Also, as soon as you use it (for instance, if @@error <> 0), it will be reset to zero.
In your procedure, try this:
Declare @error int
Declare @errmsg varchar(200)
Set @errmsg=''
...
Update myTable Set...
What do you mean by a robust database?
Access works very well for 10-20 users and databases under 100 MB. Beyond that, it starts having problems. If you have a significantly larger user base or data size, you should consider SQL server or Oracle. Both of these are much more expensive than...
I want to put my "Previous Page" and "Next Page" links into a separate frame, so they'll always be in the same place and I don't need to copy them into every page.
When I tab to the frame, first the window gets focus, and then I need to tab to the Previous Page link.
I've...
You need something like this:
Select department, count(table2.document_id)
From table3 Inner Join
(table2 Inner Join
(Select table1.document_id From table1
Where conf_code='show' Or
table1.document_id In...
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.