Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Form Trickiness

Status
Not open for further replies.

shogikishi

IS-IT--Management
May 30, 2008
2
US
Greetings Tek-Tip Gurus,

I have an Access 2003 form that puzzles the hell out of me.

How to have a submit button on each record in a subform that is independent of other submit buttons on that subform.

Within the subform is a continuous recordset with each record containing basic info such as type, volume, frequency, etc - basic data relevant just to that record. There is a submit button on each record that runs calculations on the data in the record and posts it to another table.

What I'd like to do is make it so that the submit button can be clicked only once (to avoid accidentally reposting the same record or overwriting data). I've been able to write a sub that disables the submit button after it has been clicked, but by doing so, it disables ALL the submit buttons for all the other records in the subform.

Is there a way to have them act independently of one another, so that a sub acts on just the button in the current record and not all of the records on the subform?

An image of the subform/button can be seen here:

Any help would be appreciated
 
Hi Shogokishi,

1.) Your link is bad
2.) Are all your controls unbound? Cause if they are bound you won't need to submit anything in the first place. A form usually is only a mask and you write directly to the table(s), no need to "save" a record.

3.) If your controls are unbound and you submit a certain amount of data manually, then the problem lies within the code you have behind your sbmit button(s).

Without info what shall be stored by click on one button and what by click on the other, I cannot say much.

But if these are subrecords, it also depends wether you have integral reference or add/delete triggers and so forth.

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
First, post Access questions in the Access forums where the Access gurus are, only a handful of us look at this forum.
So, post in
Microsoft: Access Forms

Next read and study:
Fundamentals of Relational Database Design

You state "There is a submit button on each record that runs calculations on the data in the record and posts it to another table".
You do not store calulations in a table. So that would clear up most of your problem right there.
This raises a question for me - are your tables normalized?
 
MakeItSo, you rock. Despite not having a working link to a pic of the subform, you had some ideas that have got me thinking in a new direction. I think I'll be able to work out a real solution. In the meantime I have constructed a suitable workaround.

fneily, aside from pointing out the right forum to a newbie, your recommendation was of no value and the remedial article on relational database design was insulting. If you are an instructor in real life, consider the implications to your reputation for assigning busy work in an academic setting.

 
Great to hear, shogikishi.
I'm always happy to help people avoid the mistakes I made in the past... :p

[navy]"We had to turn off that service to comply with the CDA Bill."[/navy]
- The Bastard Operator From Hell
 
Ok. By the way, this isn't an academic environment. So if you're a student, they'll ban you. Maybe it's in your religion to be wrong about normalization.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top