Not sure what error this is

Remember, the user should not see fieldnames or controlnames, so could just be in English, as long as you know English, and your posts seem to indicate that you do.
You can set Greek captions for them in the table, and then when added to form/report, that is what the user gets to se.
 
Note: If you compile, you'll find a bunch of problems in other parts of your code, try to solve those too. You can also redo the form making sure no controls have those "foreign" (to Access) characters.
I tried compiling and it asks me to put a bunch of brackets on some names. But the database works fine as it is now and I'm afraid I'm gonna screw it up completely if I do. Why does it do that if it works fine?
 
First make a copy of the current file.
On the current file you only have to comment the line where the error is highlighted by placing a quote (apostrophe) at the beginning of it.
In the case of errors in an If loop you have to comment all the lines of the same from If to End If.
 
Last edited:
I tried compiling and it asks me to put a bunch of brackets on some names. But the database works fine as it is now and I'm afraid I'm gonna screw it up completely if I do. Why does it do that if it works fine?
I did not get any message asking me to place brackets around any names after attempting to compile. Instead, it encountered issues related to missing objects and a procedure where you attempted to set a method as the value of a control.

The database appears to be functioning fine as is because none of those procedures are being triggered. It seems that the controls associated with them have been renamed or removed. However, the compiler detects that the referenced controls no longer exist and highlights this issue. If you don’t resolve this, the compiler won’t be able to help you identify other problems. The compiler is important, let it find issues and you will have a better development experience.
 
Last edited:
Is this what you are talking about.
This comes up after I pressed that Add button your circled.
1729177363069.png


DEbug leads to
1729177420876.png


If I select an entry in the Supply combo and then press Add I get
1729177638041.png

and
1729177597038.png


Unable to compile as it states Me.Customer does not exist.
1729177846845.png



and when I Cancel the debug and get back to the form I get
1729178133372.png
 
Last edited:
I wanted to change the file but I accidentally deleted the whole reply

so I have a new error and I don't now what it is.

If I press Add, it takes the supply info (SupplyT), supplier info (SupplierT) but it won't find the Lot Number and it gets stuck.


2.JPG
 

Attachments

Is that the last image in my reply?
 
1729178749786.png


I don't know how to change the form name to compile this part
 
You have more issue than that.
The query for your subform is read only. :(

That is why I get 'Field cannot be updated'
None of those fields can be updated.
 
You have more issue than that.
The query for your subform is read only. :(

That is why I get 'Field cannot be updated'
None of those fields can be updated.
I don't know what you mean or how to fix that
 
I am out, as I do not know where that code is.
The labels are all in Greek, so PurchaseSum means nothing to me, unless I have to go search for each individual control in each form.

If that control value is on the subform, then your would use Me.Parent.control =
If that control value is on the mainform then look at the syntax here.

 
I don't know what you mean or how to fix that
Well the source for that subform is read only, so you cannot set any value in that query. :(
Try it yourself, in just the query output for the form itself.
 
The labels are all in Greek, so PurchaseSum means nothing to me, unless I have to go search for each individual control in each form.
That was also a leftover which I deleted now.
Well the source for that subform is read only, so you cannot set any value in that query. :(
Try it yourself, in just the query output for the form itself.
I also allowed the data entry but I still get the same error as before

I fixed all the controls and deleted any leftover commands that didn't make sense and compiled the database
 
Last edited:
Ok I fixed this problem but now there is another one

Even though it takes all the data I input, if I close and reopen the form, the Batch Details don't show, even though they are saved in the table

1729189286927.png
 

Attachments

Last edited:
Just for clarification of the original question, regarding this error

"Microsoft Access can't find the field '|1' referred to in your expression"

This occurs when a query has an error in the first field requested in a SELECT clause.

In your case, you had a domain aggregate function similar to DLookup( [fieldname], [tablename], "criteria clause" ) for which you had not enclosed the field and table names in quotes as the function requires.

What Access does with domain aggregates is that it synthesizes an SQL statement based on the input function parameters defining the field, table, and criteria. But these functions required quoted strings for the three arguments. What happened here is that the [fieldname] parameter SHOULD have been "[fieldname]" but instead, the function tried to look up whatever was in the field whose name was in [fieldname] - which might even have been null at the time. That field would have been the first field in the synthesized query, and therefore when it failed, it was referenced as "|1", i.e. the first field. You CAN see errors like this with "|2" sometimes, though not from domain aggregate functions. Sometimes when I was dynamically building an SQL query I would see this error (with other than |1) if my concatenation was incorrect when I tried to build that string.
 
If you set Data Entry to Yes, you can only add records. :(

Worst named property in Access. :(

1729194175333.png
 

Users who are viewing this thread

Back
Top Bottom