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

Txt Import w/manually date input

Status
Not open for further replies.

newestAF

Technical User
Jul 9, 2009
72
US
I'm getting pretty decent with my VBA writing but this one has me stumped. I'm importing a txt file into access. It's the basic "read one file and write another to import". When the records populated from the txt file are imported into access, those records have a specific suspense date that needs to be associated. Ex. Records imported on 6 Jul 2010 would have a suspense of 8 Jul 2010 and those imported on 7 Jul 2010 would have a suspense of 9 Jul 2010. The suspense is not always 2 days. My only thought is for the vb programming to pull up some type of window and ask for the date and then vb to take that date and input into the rewritten txt file before importing. Looking for input of the best way to do this and where to start.
 
The suspense is not always 2 days.
So, what criteria is used to determine the suspense time frame?


Randy
 
It's 2 work days but we have some days that the office is closed and those days are not counting and holidays are also not included so it seems easiest to manually input what date to use.
 
You could use an Inputbox ( look in the help). But that would not be my suggestion.

You don’t mention how you initiate your importing. Say for example, you have a Command Button on a form to trigger your code, you could add a test box. You wouldn’t need to bind the textbox so when the form opens the box is empty. You could set the format of the textbox to your date format. You could set the font SIZE (so its easier for tired eyes).

If just you are going to be importing then you could get by with the inputbox. But if someone else is going to handle this routine they will appreciate the textbox.
 

If you look through the FAQ's, I believe you can find
some help regarding business days / holidays / weekends.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top