Problem with Combo Box....

klynch0803

Registered User.
Local time
Today, 09:56
Joined
Jan 25, 2008
Messages
102
What is wrong with my combobox?

I cant it to display the Item int he box instead it wants to display the ItemID...

I cant figure out if its in the properties or if its in the afterUpdate Event (I dont think its here)...

The actual event would be you select the item and then all the other fields would be automatically filled based on the record selected..

The FOrm name is "Form1" if someone could please help me out...
 
Last edited:
Basically you have the column widths set to display the ID (a combo box will ONLY display ONE column after selection). Set the ID column width to 0" and it will display the next column.

So, instead of 1";1";1";1";1";1"

use 0";1";1";1";1";1"
 
Basically you have the column widths set to display the ID (a combo box will ONLY display ONE column after selection). Set the ID column width to 0" and it will display the next column.

So, instead of 1";1";1";1";1";1"

use 0";1";1";1";1";1"

That only displays the date Bob... SO would I then go to?

Code:
-1";1";1";1";1";1"
 
Nope, you'll have to change the column order to put the field you want to show as the second field.
 
I got you...

Its 0",0",1",1",1"

Thanks for your help..
 
Ok So Bob I got that fix thanks so much... but now why am I getting this Syntax error when I select update? It appears all my field names etc are correct...

====START ERROR

Run-time Error '3075'

Syntax Error (missing Operator) in query expression "actqy' set tdatinventorycheckup.difference = 'diff'.

=====END ERROR

Code:
 Private Sub Update_Click()
    Dim sql As String
    
    sql = "update tdatinventorycheckup " & _
          "set tdatinventorycheckup.actuallevel = 'actqty' " & _
          "set tdatinventorycheckup.difference = 'diff' " & _
          "where tdatinventorycheckup.id = 'rcrdid'"
          
    DoCmd.RUNSQL sql
          
          

End Sub
 
Not sure on first glance. Set a breakpoint at the DoCmd.RunSQL line and use the immediate window to find out what the SQL string actually looks like.
 
Not sure on first glance. Set a breakpoint at the DoCmd.RunSQL line and use the immediate window to find out what the SQL string actually looks like.

I can only get a False....

Maybe if you have time or get time you can take another peek at the file??

I have upladed an updated one for you to look at if you have time..

Thanks Again...
 

Attachments

Change your SQL statement to:

Code:
          SQL = "UPDATE tdatinventorycheckup " & _
          "Set tdatinventorycheckup.actualLevel =" & Me!ActQty & ", " & _
          "tdatinventorycheckup.difference =" & Me!Diff & " " & _
          "WHERE tdatinventorycheckup.id =" & Me!rcrdID & ";"
 
Change your SQL statement to:

Code:
          SQL = "UPDATE tdatinventorycheckup " & _
          "Set tdatinventorycheckup.actualLevel =" & Me!ActQty & ", " & _
          "tdatinventorycheckup.difference =" & Me!Diff & " " & _
          "WHERE tdatinventorycheckup.id =" & Me!rcrdID & ";"

Excellent Thank You so much Bob... Me! makes the differnce by telling it on the form itself... I see ... Thanks again for the help..
 

Users who are viewing this thread

Back
Top Bottom