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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

continuous form changes

Status
Not open for further replies.

Samulayo

Programmer
Aug 13, 2002
46
0
0
GB
i have a continuous form with 5 fields on it
ID
medication
date perscibed
discontinued y/n
date discontinued

I would like the field date discontinued to only be enabled when discontinued y/n = -1 (yes). I can do this with ease using form current and after update with a single form, but how would it be possible with continuous forms? At the moment i can only get the field on ALL records to enable/disable.
Any help would be greatly appriciated

Regards
Samulayo
 
sooo.... i take it this is either very difficult to do or impossible. Damn, ill have to figure out another approach for doing this.
 
Samulayo,

You are correct in this is either very hard to do or darn near impossible. I don't have any code, but I have seen something similar to what you are trying to do....

The problem lies in the fact that a continuous form really only contains one occurance of each of the controls you are displaying....What appears to be many controls is really only one to Access. So when you change a property of the control, it "appears" to change them all....

****************************
Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
First, you need a way to identify the specific record which needs to be changed. This has been 'documented' in htese fora in other / previous threads so search for the details. Many of these t4echniques use an unbound check box to select multiple records for processing and 'derive' the record Id from the 'associated check box', while others include a 'recordcounter' and similarly derive the record identifier from this.

I generally place the continuious form in a sub form. On the main form, I place the conrtrols necessary to make the desired changes (including the record identification / selection) and a command button which uses the Main form info to generate / populate an update query which operated on the subforms' recordsetclone.

I would also advise aginst the boolean field, as the simple presence of the date alread indicates the treatment has been 'discontinued' and thus the boolean is redundant to the date.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Thanks for the replies. I have found no real way to do this, so i have decided to use the method of highlighting the record that is discontinued, the code for which i believe was writen by bill powers.

Regards

Samulayo
 
Easy. Just add a field in the table for that field, it doesn't have to be of any real use other than the form. If it is tied to a field in the table, you can set values for controls separately. I have done this with an Inventory form where the customer wanted to be able to process individual lines in an order. I added a Yes/No field called Processed in the table for Order Details. If you need any more info, just ask. Hope that helps.

LJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top