J
Jerry Stoner
Guest
I need to Link to an ODBC DB and am using the following code to do so
DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=viper;UID=mcguiree;PWD=mcguiree;LANGUAGE=us_english;" & "DATABASE=workdb", acTable, "dbo.adv_loc_event_ad", "DBO_ADV_LOC_EVENT_AD"
I get the prompt to select unique record identifier in the source table. The whole point of the exercise is to run an automated import process on Sunday nights so I cannot handle the prompt. The code is being used because for some reason (I dont know) the links frequently break. Tried a send keys Enter but of course that does not work because the code is paused at TransferDatabase waiting for a response.
Any ideas how to avoid getting or to satisfy the prompt in code? BTW I do not have access to the source db and the owners absolutely will not add a primary key for me.
DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=viper;UID=mcguiree;PWD=mcguiree;LANGUAGE=us_english;" & "DATABASE=workdb", acTable, "dbo.adv_loc_event_ad", "DBO_ADV_LOC_EVENT_AD"
I get the prompt to select unique record identifier in the source table. The whole point of the exercise is to run an automated import process on Sunday nights so I cannot handle the prompt. The code is being used because for some reason (I dont know) the links frequently break. Tried a send keys Enter but of course that does not work because the code is paused at TransferDatabase waiting for a response.
Any ideas how to avoid getting or to satisfy the prompt in code? BTW I do not have access to the source db and the owners absolutely will not add a primary key for me.