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

Hiding a RECORD 1

Status
Not open for further replies.

troix

Technical User
Jan 20, 2004
46
US
I've done this before, and I have totally forgotten how.

I want to create a command that, when a certain box is "dirty" (with text), a button can be pressed that says "Clear Copy". Once "Clear Copy" is pressed, those records are not seen. They are NOT deleted from the table, but those records are deleted from view. However, they can NOT be deleted from view until the button is pressed.


I don't want the text box hidden, but I want the WHOLE RECORD hidden (this will be a rolling form).
 
I know there is a way to run a procedure, if a box is checked ALL RECORDS with the checked box will disappear after the "CLEAR" button is pressed. They will stay in the Table, but won't appear on the form.
 
How are ya troix . . . . .

Try ths:
[ol][li]Add a [purple]Yes/No[/purple] field to the approiate table.[/li]
[li]Base the [purple]RecordSource[/purple] of the form on a [purple]query[/purple] that includes the [purple]new field.[/purple][/li]
[li]In the query, add [blue]False[/blue] to the criteria for the new field.[/li]
[li]In your [blue]Clear Copy[/blue] button, add the following lines:
Code:
[blue]   Me![purple][b]YesNoFieldName[/b][/purple] = True
   Me.Requery[/blue]
[/li][/ol]
[purple]Thats it! . . . give it a whirl & let me know . . .[/purple]

Calvin.gif
See Ya! . . . . . .
 
I am okay. I am a little confused on the adding a query part. I am not a user of queries, usually.
 
[blue]I am not a user of queries, usually[/blue]
Your missing out on one of [purple]Access Greatest Puwers![/purple]

Queries allow you to determine what records are returned!.

Do you know how to make a query?

If not look it up in help. You need to be able to make one . . .

Calvin.gif
See Ya! . . . . . .
 
Actually, I am so proud of myself, I figured it out on my own *WHEEEEE*

But what we want is a CHECK BOX (instead of yes/no) and if the CHECKBOX is checked, after pressing the button, the YES's become invisible.
 
troix . . . . .

and what did you figure out?

Calvin.gif
See Ya! . . . . . .
 
i figured out it's easier to tell it the opposite of what I REALLY wanted. somehow it worked. *scratches head* wheeen Microsoft. Maybe it's because I think backwards.
 
Actually, it's not working, it's deleting the record the first record REGARDLESS. *ICK*
 
ne'er mind, i just told it to add a new record first. that worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top