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

Flag user for specific records

Status
Not open for further replies.

mattpearcey

Technical User
Mar 7, 2001
302
GB
I will be entering records into my database that i need to be flagged when a user come across them. For example, a button at the start taht i can click if they are a client so that that record is then marked. Then when going back into the database at a later date, if the user comes across that entry, a message will come up because it has been marked as a client, and thus not to modify it, etc.

Anyone have any code or ideas even? Thank you for your help already.

Matt Pearcey
 
A couple of ideas. Your flag just needs to be a column in your table, maybe named Client? Make the datatype Yes/No.

Then in the form that users will browse to look at the records, create a label that contains the text you want. In the form's OnCurrent event, check the value of the Checked? field and if it is Yes, then make the label's Visible property equal True, else make it False.

Does this sound like what you are looking for? Kathryn


 
Kathryn - you are a goddess!!

Thanks Thank you for your help already.

Matt Pearcey
 
Spoke too soon. Having troubel to work it out. Such as, What properties do i go to to the OnCurrent envent, and value of the Checked. Thought i know what to do, but am now lost. Just a little more help please? Thank you for your help already.

Matt Pearcey
 
OK, have you added a field to the table yet? If so, what is the field's name?

I think you are asking how to get to the OnCurrent event. If so, go to the form that user's will use to browse the records. Put the form in Design mode. From the menu, choose View -> Properties. The properties box should appear and the blue bar at the top of the properties box should say Form.

Choose the event tab and click in the OnCurrent event. Click on the ... button to the right and choose Code Builder.

You will now be in the Code window. You should see

Sub Form_OnCurrent

End Sub


You want to change that to something like:



Sub Form_OnCurrent

If Me!YourFieldName="Yes" Then
Me!YourLabelName.Visible=True
Else
Me!YourLabelName.Visible=False
EndIf

End Sub

Does that help? Kathryn


 
Done that, now it doesn come up at the start, irrespective of what i have ticked. SSo, im having troubel now with the beginning part. Shall i go back to thr from design properties and play withthe oncurrent area? Thank you for your help already.

Matt Pearcey
 
Ok, what doesn't come up at the start (the start of what?)

Tell me exactly what you do, or what the form does and we should be able to work this out. Kathryn


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top