So first I fill in all the info in support tables and after that only run the forms to fill in the shipping table? Wont it replace the data in support tables ? Shall I change the properties of Join in this case ?
p.s. sorry for being so bad at this![]()
So first I fill in all the info in support tables and after that only run the forms to fill in the shipping table? Wont it replace the data in support tables ? Shall I change the properties of Join in this case ?
p.s. sorry for being so bad at this![]()
that's what I would do yes, but don't forget, if you change any of the field or table names you will also have to change all the code to reflect those changes as well. The code will only work on my database with my table/field names if you don't modify it.
When I want to go to the design view of the query it says " Access cnat represent the join expression ImportTemp.Cargo=tblCargo.Cargo_Code in design view " then opens sql. But I havent changed any names or anything , what can be the reason?
the table IMPORTTEMP in my example was a linked spreadsheet. If you do not have that excel file spreadsheet any query referencing it is going to fail
Hi again , now when i imported all my files do I have to keep the excel files or as long as it is already imported to the database I dont really need them anymore ?
IGNORE THIS I ALREADY FOUND I JUST DONT KNOW HOW TO DELETE A POST
I have 25 files all with identical structure I have uploaded all of them besides one " Run time error 3061 Too few parameters Expected 1 " what can it be from ? it gives a debug on the VBA line
sSQL = "INSERT INTO tblPartner (Partner_Code) SELECT Partner FROM ImportTemp GROUP BY Partner"
db.Execute sSQL
so i thought there is smth with the partner column but i cant find anything . Any ideas ?
likely you have a blank record in your imported file, look at all the values in your importtemp table and see what's going on in there, it may also be that you have a number value in a text field that may be hosing things up, look for anyhthing yin your partner_code field that looks out of place
I i found the mistake its fine now.
Now i wanted to make another query select or make table so I was trying to make joins between the shipping table and the support table to make kind of a new table or query collecting sm like Cargo name, partner name .....year, trade and then afterwards i could work with that table put sum sums or criteria etc. but it wouldnt let me connect tblShipping CargoID with tblCargo Cargo ID , i mean it would connect but when i run it would says "SQL statement couldnt be executed coz it contains ambiguous outer join. To force one of the joins to be performed first , create a separate query that performs the first join and then include that query in your SQL statement " . I dont really understand how is this different from the joins that were successfully done between ImportTemp and the support tables ? TNX