Thanx, Sammyb.
Exactly what I was looking for.
There is, however, something strange in that the date/time stamp is always the same. In this particular case the date stamp is 2/22/2006 7:02AM whereas the actual is 2/28/2006 7:34AM. Even if the date/time is altered in the control panel.
When I start the program I can make a backup of the database. No records have been called at that time. However, after a record is called the error occurs whenver trying to backup.
Apparently closing the connection and recordset does not work. I tried Close(Filename) but that does not work...
Would like to backup an Access database. Right now I am using Filecopy sSourceFile, Filename which works until I open a record. Then I get a 'Permission denied' msg.
My code so far:
cn is the database connection
If cn.State = adStateOpen Then cn.Close
FileCopy sSourceFile, sFilename
Thanks.
Many thanx for the suggestions. Here is what I have been working on to solve this situation.
Declared bFormChanged as public boolean and placed it into the keypress event handler. Then whenever the user tries to move from the form/changes records, a msgbox alerts to the change.
It works...
I have a form with a bunch of txt boxes, combo boxes and check boxes. I would like to capture when the form changes to alert the user when a movement is made to leave the form without saving the data entered. An example would be clicking a cmd button to clear the form.
Thought about using the...
Casper,
Tried it and get a 'key is not unique' msg at the very beginning of the parent node
Do Until rst1.EOF
sArtistKey = StrConv("a" & rst1.Fields("ArtistID").Value, vbLowerCase)
frmSSTab.tvwMusic.Nodes.Add , , sArtistKey,_ rst1.Fields("DisplayName").Value 'error occurs here
Kim
Correction - the 'index out of bounds' error is showing up on the second level. After deleting the artist the treeview re-populates first by collecting the artists, then the albums. This is where the index error occurs this time.
When a new artist is added, then only the artist is listed. The...
Since the tables have a relationship of one to many (tblArtists to tblAlbums to tblTracks) if the parent node is deleted then all tracks for the artist are deleted first then all albums are deleted then the artist is deleted. Thus, there is no parent node.
Error msg 'key is not unique' when using the replaced code.
Reverting to the original code, if an artists ID is not sequential then the out of bounds error occurs, Therefore, if a title and/or an album is deleted, there are no errors. Only when an artist is deleted.
The out of bounds error...
As outlined in the above procedure, I have prefixed each auto number with a different character. The first is "a", the second is "o" and the third is "p".
Thanx for the suggestion. Now the key is not unique and nothing loads. an out of bounds might have ocurred because of a record being entered without a proper ID.
Kim
When populating a mshflexgrid, the first column is MT. How to have the first line to be the starting point? So far I have
With flgTracks
.AddItem rst!trackid & vbTab & rst!Title & vbTab & rst!Duration
End With
flgTracks.Col = 0
flgTracks.Sort = 1
rst.MoveNext...
Trying to populate a treeview. Works if a record is not deleted from the database. However, once a record or two are deleted the treeview will not populate because of the 'index out of bounds' msg.
There are three levels (nodes?) for this treeview. The first is to show the artist, the second...
Another set of eyes is always helpful. Thought I had the single quotes inside the double.
Any ideas on how to get the right record to show up after only one click?
Thanx.
With a click in a treeview the records populate a datagrid. Each record has 3 fields; an ID, Title and length. When a record is clicked in the datagrid three
text boxes are filled with the data for editing. There are 2 areas of concern:
1. When the datagrid is clicked the first time the first...
I did a 'datagrid' search also and got a 'no results for ...' response.
To set the widths, alignment, caption, et al of a datagrid
With datagrid1
.Columns(0).Width = 500
.Columns(0).Alignment = dbgRight
.Columns(0).Locked = True
.Columns(1).Width = 4000...
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.