Access adds gibberish to a combofield after dublicating a record

scrpic

New member
Local time
Today, 11:05
Joined
Nov 29, 2021
Messages
7
Hallo theređź‘‹,

in our Forms we have a Combofield called 'Project' with a Query Datasource. if you select the Project the last values of that Project show up in the Form. in the next step you can update some Field and dublicate the record.

if we update some informations in the fields Access adds some gibberish to the Combofield"Project".

1638196137016.png


im using Access 2019

the aim of the Form in to select a Project and fill the values with the last record of this specific Project. the duplicate button is to "edit" the last entry if there is no Update the field remain unchanged.

I would be glad if you can offer some help
Thank you:)
 
Last edited:
Hi. Welcome to AWF!

I tried to duplicate the issue, but I didn't get the same result as you. My record duplicated fine.
 
try this order of steps:

1.open File
2. Open Form
3.select project
4.change value
5.duplicate
6.gibberish
 
perhaps your project field is a long text field?
 
its a short text, what datatyp could resolve my Problem?
 
its a short text, what datatyp could resolve my Problem?
What is the purpose of the Combobox to select a Project with the Row Source set as shown below:-

SELECT Gesamttabelle1_Last_Record.ID, Gesamttabelle1_Last_Record.Projekt
FROM Gesamttabelle1 INNER JOIN Gesamttabelle1_Last_Record ON Gesamttabelle1.ID = Gesamttabelle1_Last_Record.ID
GROUP BY Gesamttabelle1_Last_Record.ID, Gesamttabelle1_Last_Record.Projekt
ORDER BY Gesamttabelle1_Last_Record.Projekt;
 
What is the purpose of the Combobox to select a Project with the Row Source set as shown below:-

SELECT Gesamttabelle1_Last_Record.ID, Gesamttabelle1_Last_Record.Projekt
FROM Gesamttabelle1 INNER JOIN Gesamttabelle1_Last_Record ON Gesamttabelle1.ID = Gesamttabelle1_Last_Record.ID
GROUP BY Gesamttabelle1_Last_Record.ID, Gesamttabelle1_Last_Record.Projekt
ORDER BY Gesamttabelle1_Last_Record.Projekt;

Our intention is to select a Project in the combobox with the last record from this project shown in the formular.

For this we use the two queries "Gesamttabelle1_Last_Record" and "Gesamttabelle1_Last", then set the ID in the query to Max and group by projects, so we only see the last record of the selected Project.

1638206294101.png
 

Attachments

short text should be OK

I don't use macro's so can't really help with this.

All I can say is the revised query appears to be adding a gibberish value - the drop down appears to be working OK

Good look
 
Our intention is to select a Project in the combobox with the last record from this project shown in the formular.

For this we use the two queries "Gesamttabelle1_Last_Record" and "Gesamttabelle1_Last", then set the ID in the query to Max and group by projects, so we only see the last record of the selected Project.
We don't currently know what the database is being used for but normally if a Project can have many records associated with the Project selected, then this would normally be dealt with by a Table for all projects ie the Parent and then a Table to deal with records associated with Each Project ie the Child Records.

You would then manage data input by using a Main Form with a Subform.

You currently only have 1 table where you are trying to manage both Parent and Child records.
 
Our intention is to select a Project in the combobox with the last record from this project shown in the formular.

For this we use the two queries "Gesamttabelle1_Last_Record" and "Gesamttabelle1_Last", then set the ID in the query to Max and group by projects, so we only see the last record of the selected Project.

View attachment 96457
Does this help?
 

Attachments

I wonder if the table is corrupted.

Try exporting the data to text. If the table is a stand alone, you can just delete the rows and compact the database. Then open the db and link to the text file and append the rows.
 
Last edited:
It might be because the access file is corrupt, do you normally copy the file to external mediums like external hard drive? Sometimes an access file might get corrupt via that or did u suddenly shut the system, or if the file is shared accross a network, corruption can happen when network goes off during a save operation.

open a new database file and copy the tables, forms, macros, reports,queries and try working on this new file.
 
Something you said makes me pause, and because you are posting in English but using another language in your project, I want to be sure I ask this clearly.

You said: "if you select the Project the last values of that Project show up in the Form. in the next step you can update some Field and dublicate the record."

How are you doing this? I am imagining that you would select a project and want to see some related information based on that project. But I see only one form. Mechanically speaking, how are you making this happen?

I also should add that your goal is NOT unreasonable - but there are good and not-so-good ways to go about it. That's why I'm asking.
 
see if it is fixed here.
see the afterUpdate macro on the combobox.
 

Attachments

Users who are viewing this thread

Back
Top Bottom