Griffyn;
Thanks for your response.
In fact I did mention that I don't use Autonumbers, and increment the record IDs in code.
However,in the meantime I have been able to solve the problem and the solution may help others so I'll explain.
TO RECAP:-
The grid records are selected:-
SelectRecord:=...
This is a little complicated and involves quite a lot of code, so I’ll try to explain in plain language.
On each of my Forms I have a DBGrid
The relevant query selects filtered data from a Table and this is posted to another Table whose Datasource links to the DBGrid.
The ‘filtering’ is...
Thanks Ken. However that is not the cause; this file was an attachment to an e-mail from the hard drive.
As I said, this is not a real problem, easily put right, but I am just curious. I spoke to another developer who did have the same experience - and he didn't know why either!
As a side...
One of my Users suddenly had an error message "This record is not Updatable", accessing a database which I had sent to him.
Because his firewall throws out everything that breathes, I had to remove the .mdb suffix before sending and he had to put it back on receipt.
We have done this numerous...
There are certain objects which, once created, remain constant and need to be called in more than one procedure.
The messy way of accessing these is to make a query and join the required tables; but this was making some of my procedures unnecessarily complicated and it was very easy to get the...
Thanks Roy!
I used the docmd.runcommand accmdsaverecord and that worked perfectly.
You also opened up a new vista for me!
After 3-4 years use of Access I had never seen or heard of the Docmd.RunCommand options and I hade been using a roundabout way of deleting (or rather hiding) unwanted...
I have a number of objects in my database which I need to see recalculated on screen as soon as they have been (new record) entered or changed (amended existing record). I have the following code in the "On Exit" event:-
If Me.Dirty Then
On Error GoTo err:
Dim BM As Variant
BM = Me.Bookmark...
I do use msgBoxes but another technique is to have an invisible text box, which comes visible on an event. The advantage being that you can have it any size, any font and any colours you like.
In the Form's 'OnCurrent' Property you have
'Me.[textboxname].Visible = False'
and on the...
Having had no response to this (most unusual!!) but having traced the problem myself I thought the cause and solution might be of use to other members.
Basically what I was doing wrong was to have a subform duplicated on the main Form, with different master/child links. (One linked to Self and...
I am using Access 2002 in Office XP on Windows98.
In one project I have several forms which require a Recalc when certain data is input or changed, and the focus must go back to the right object in the right record.
To do this, thanks to "tek-tips" I have the following code:-
Dim BM...
Thanks foolio12 for your very quick response.
Let me try to clarify, as you request.
"CReport" is the name of the form.
"ReportID" is the ID of the record to be opened. As I said, the line of code does open the form without a problem first time around.
I use this line...
I have a Form with two alternative Command Buttons, depending on data in a table which Changes as certain functions are completed.
One says "Print Draft Data" and, when this is actioned the completion date is entered on the table.
Next time the form is opened,the date under...
My apologies to those who gave me the right answer - which didn't work for me!
The reason was that on installation I have created two copies of OfficeXP, one in the folder MicrosoftXP and one in the default Microsoft Office (which also holds Office97). I don't know how this happened and I know...
You definitely do not need to delete a record and add a new one if all you are doing is amend the details.
Your input form should update your table automatically.
My impression, for what it is worth, is that if the structure of your database is right you do not need Vb.
Now, as a self-taught...
GingerR
Yes it does open Access! Next job is to work out why it does not go the rest of the way.
I need a break, so I am closing down for the evening (20.30 here) and I'll start again in the morning.
Really I am thrilled with the response from the three of you and I can't thank you enough. If...
Thanks Bob
I wasn't proposing to go down the Shell Route as the Macro RunApp seems so much neater if only I can make it work.
I have gone on to the Microsoft Forum and someone there had exactly the same requirement and was given the same code:-
All I have done is change the folder names from...
Sorry gents - still no go!
Bob Scrivener's code produces the same error message.
So to check other paths I tried:-
"C:\Program Files\Microsoft OfficeXP\Office10\Excel.exe” \\D:\Accounts\HMaccts.xls
"C:\Program Files\Microsoft OfficeXP\Office10\Msaccess.exe” \\C:\Program...
Dear GingerR
Sorry, I must come back to you again - I am now so close it is is mortifying, but there must be something silly in my code that I just cannot spot.
Of your options I decided that the RunApp macro is the best. I created this with the Command Line -
"C:\Program Files\Microsoft...
Thanks, I think I can work on from there.
But I assure you, my method is not as crazy as your comments suggest.
Sorry if I didn't make myself clear. My target market is a large number of small businesses, many of whom are working with stand-alone machines. The program is designed for private...
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.