Unable to navigate between records, custom save button doesn't save (1 Viewer)

Emjay

New member
Local time
Tomorrow, 04:16
Joined
Jul 23, 2013
Messages
5
Hi All,

I've been working on a database for work for the last few weeks and this forum has been a Godsend many times over, but now I have a problem that I can't find any reference to.

Using Access 2003, I have a form that uses 3 cascading combo boxes in the header to find a unique record, and a command button that brings up the rest of the record into unbound fields in the body of the form.

It works fine for finding records, but whenever I enter/change data on it, the record doesn't save. The navigation buttons at the bottom don't work - the Next/Previous record buttons are disabled, and the First/Last Record buttons do nothing.
Navigation buttons are enabled/activated in the properties.

I tried getting around this by creating a Save Record command button - first using the wizard, then using VBA code DoCmd.RunCommand acSaveRecord as advised by [missinglinq;696351], but this still doesn't save the changes.

Any help would be much appreciated!
 

Mihail

Registered User.
Local time
Today, 19:16
Joined
Jan 22, 2011
Messages
2,373
I have a form that uses 3 cascading combo boxes in the header to find a unique record
If this record is UNIQUE, as you say then THIS record is the first one and the last one.
the Next/Previous record buttons are disabled
Of course, because not exist a previous record or a next record.
and the First/Last Record buttons do nothing
False: this buttons do what to have to do but, as I say, your current record, first record and last record is only one (the same).

Maybe I (we) can help you if you will upload the database.
 

Emjay

New member
Local time
Tomorrow, 04:16
Joined
Jul 23, 2013
Messages
5
Thanks, Mihail. That reasoning as to why the navigation buttons don't work is pretty sound. I'm still stumped by the save not working.

The scenario is:
Units (Ships) are issued Trials in a 'Package', then the results are input at a later point. So a ship is assigned a trials package [from:input trial package], then trials that are in the master repository can be added to the package using [form:assign_trials_to_package].
[form:input_results] is used to look up an isssued trial and (hopefully) assign results. This should save the results into the same table as when they are assigned to a package (this allows us to see which units have incomplete trials). However this is the form that I can't get to save changes.

I apologise if I have not stuck to proper naming conventions throughout - I've had to remake objects several times so I am trying to get it to work properly before tidying it up.

Thanks for your help!
 

Attachments

  • db2.zip
    169.3 KB · Views: 133

bob fitz

AWF VIP
Local time
Today, 17:16
Joined
May 23, 2011
Messages
4,721
Emjay

Take a look at the attached db.
I have added some code to the save button which opens a recordset of table “Table_Assigned_Trials” where “EntryID = the text box called “txtEntryID”. The code checks for a value in “txtResults” and “txtDateConducted” and then sets the value of the three controls on the form in the appropriate fields.
I have also added some code to the form’s On Open event that sets the Enabled property of the form’s textboxes to “Enabled” = No. This is changed back to “Yes” in the code attached to the click event of the “cmdFindRecord” button.
HTH
 

Attachments

  • db3.mdb
    520 KB · Views: 84

Emjay

New member
Local time
Tomorrow, 04:16
Joined
Jul 23, 2013
Messages
5
Thanks, Bob, that's brilliant!
I was going to make the lower half of the form inactive and use an 'input results' command button to enable it, but I don't have to - your way is better.

Time to fill in the tables and crash test it now.

Thanks heaps!
 

Users who are viewing this thread

Top Bottom