List search (1 Viewer)

DatabaseTash

Registered User.
Local time
Today, 22:30
Joined
Jul 23, 2018
Messages
149
Am I deleting it?? Which part of the code is deleting?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:30
Joined
Oct 29, 2018
Messages
21,449
Am I deleting it?? Which part of the code is deleting?

Right now, you're not deleting the previous records. Just to clarify, are you importing the same Excel file every time?
 

DatabaseTash

Registered User.
Local time
Today, 22:30
Joined
Jul 23, 2018
Messages
149
No. As it will be used by multiple uses the excel file will have different names. that is way I thought it would be better to use the browse button. Having the variation in name, will it still be possible to append it to an existing table rather than insert a new one each time?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:30
Joined
Oct 29, 2018
Messages
21,449
No. As it will be used by multiple uses the excel file will have different names. that is way I thought it would be better to use the browse button. Having the variation in name, will it still be possible to append it to an existing table rather than insert a new one each time?
That depends. You might get an error if the structure of the selected Excel file is different from the structure of the table you're trying to append the data into. So, if this is possible, it would be better to delete the existing table and just let TransferSpreadsheet create it again.
 

DatabaseTash

Registered User.
Local time
Today, 22:30
Joined
Jul 23, 2018
Messages
149
Good point, about the structure.
So I would be better to keep it how it is inserting the table at the moment? What would be the best way to delete the temporary table? Would I include it in the close button code?

Something like this??

Private Sub cmdClose_Click()
DoCmd.Close acTable, tmp_table
DoCmd.Close
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:30
Joined
Oct 29, 2018
Messages
21,449
Good point, about the structure.
So I would be better to keep it how it is inserting the table at the moment? What would be the best way to delete the temporary table? Would I include it in the close button code?

Something like this??

Private Sub cmdClose_Click()
DoCmd.Close acTable, tmp_table
DoCmd.Close
End Sub
Well, to delete the table, you would have to know its name. So, maybe when the user selects a file and you import it into a table, you can somehow save this table name somewhere, so you can delete it before closing the database.
 

DatabaseTash

Registered User.
Local time
Today, 22:30
Joined
Jul 23, 2018
Messages
149
Okay so the code would some how have to learn the name each time to know what to delete?

I think this is starting to get beyond my skill level.
 

DatabaseTash

Registered User.
Local time
Today, 22:30
Joined
Jul 23, 2018
Messages
149
Hi. For importing the input, you'll probably have to use code. For copying and pasting, I am not 100% sure how you would handle it. If you copy and paste into a box, you'll probably need code to parse it. Maybe you can copy and paste straight to a table. Once you have the user's input into a table, you might be able to use a query to show all matches, and if your plans table already have a link field, then all you have to do is include it in the query, and the user should be able to click on it.

Thanks for your reply. Much appreciated. :)
 

isladogs

MVP / VIP
Local time
Today, 13:30
Joined
Jan 14, 2017
Messages
18,209
For info, the post you much appreciated was just copied from post #2 by the DBGuy.
 

DatabaseTash

Registered User.
Local time
Today, 22:30
Joined
Jul 23, 2018
Messages
149
For info, the post you much appreciated was just copied from post #2 by the DBGuy.

OMG. I didn't notice that, as the post was a while ago. I have now solved the problem thanks to DBGuy's continued assistance. Thanks DBGuy.:)

thanks for letting me know.
 

isladogs

MVP / VIP
Local time
Today, 13:30
Joined
Jan 14, 2017
Messages
18,209
No problem. It seems the same member has copied several older posts in the same thread as a way of building their post count.
I've just deleted their post, You may wish to transfer your thanks to post #2!
 

Users who are viewing this thread

Top Bottom