Where is the code running? In Search.mdb? Are the two databases in the same location? If the Publications database is in the same folder you can get the current path of the Search database using either:
CurrentDB().Name or CodeDB().Name
This returns the Search databases path and filename. Then you can strip off the filename and append the path to "Publications.mdb" and that should work.
Another approach which I have also used is to put the path of the database into a table and then write a function to retrieve it. That way when you change the database's location you just have to change the path in the table.