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

Textbox Control dlookup if null data entry After Update

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have a form for processing tracking of project assets.

frmProcessingTracking. It is tied to tblProcessingtracking.

For some work I do to export records to a folder, I need to have a textbox in the header for the path. I don't want to have to set this every time.

the textbox is called CustomPath. I have it set to
Code:
=DLookUp("[tblMetadataPaths]![CustomPath]","tblMetadataPaths","[Assetprojectid]  = " & [Assetprojectid])

It pulls the record for that table, but I have an issue. If the custom path hasn't been set for that project, then there is no record.

In that case, I need to allow a person to enter in the path, and have the tblMetadataPaths append/add a new record with the assetproject id and the entered custom path in this textbox.

Can anyone please help me with how to accomplish this?

Thanks!

misscrf

It is never too late to become what you could have been ~ George Eliot
 
You may try to use a combobox and its NotInList event procedure.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks for responding, PHV!!

How would I use a combo box? The path would be tied to a project. The asset tracking table has a list of assets, the first 6 digits of each asset tag being that asset's project id.

In processing tracking, I look up each asset and set up batches for processing. Each processing batch is the asset tag and then a 3 digit counter. The path is the same for everything in a project, so I have a separate table to contain just the path and the project id. I need to look up this path, and show it, so we know it is set, and so if it is not set, we can set it. Then it is passed as an argument for the export of the records selected to text files.

I don't see how a combo would help me, if I need a text box to either show a value (if the project has a custom path record) or to allow one to be entered if there isn't a record in the path table.


misscrf

It is never too late to become what you could have been ~ George Eliot
 
I ended up solving this problem by using a pop-up form tying the criteria of the main form filter with the pop-up form. The key here is that the vb code has to open the form in dialog, so that the code will stop running while the dialog form is open.

That thread is here: thread702-1678859




misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top