Hi guys,
I have a form for tracking inquiry records. On this form the user has the capability to add files (.doc, .pdf, .jpg etc) and save as attachments to the records.

I have a form ‘Add Attachment’ (called from the add record screen) which opens a ‘Windows file select’ dialog box to select a file. I am able to select / add the file and create a record but for some reason when the file (.jpg/.doc) is attached it is inserted in the incorrect record in the back-end (MS Access).

I greatly appreciate any inputs, thanks!

It might be they way you are using the select max. For future reference (without spaces) use the [ code ] [ / code ] tags to display your code (makes it easier to read).
Perhaps you should do a count or if the field is a unique id, do a top 1 desc to get the last id used.

Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.