Creating Macro to autofill in forms

That looks okay. It worked with just the first line? Can you post the db with the failing code in it?
 
Yes it worked with just the one code but once I entered the others I started getting an error and it didn't fill in the other fields. I attached the database for you to look at.
 

Attachments

After changing the column count property of the combo to the actual number of columns (6) and adding a record to the lookup table, it works fine for me. I suspect the error was because there was no record.
 
I am actually working with a database that has entries in it but due to client confidentially I can't post the entries on here so I made a copy and deleted the entries. I changed the column count to 6 as you suggested and I no longer get the error but it also doesn't update any fields other than field name and number. Do you have any other suggestions? Could it be because I am not using one of the columns in the referenced table?
 
I take that back. I'm still getting the error. It only happens when I try to add a new entry, once I select the building and than move to another field to fill the next part in, that is when the error occurs.
 
Not sure what to tell you. It works in the sample you sent after the changes I mentioned. See attached.
 

Attachments

  • Before.jpg
    Before.jpg
    52.7 KB · Views: 174
Hi Paul,
I've seen your post its working but I've a small problem with that. My file has more than 500 records so I can't make combo box to select. It takes too much of time finding the record I want.
I have two tables namely Tbl_Material In and Tbl_Material Request. Tbl_Material In is a master table where we enter material data. It has fields like Material ID, Description, Width, Length. What I want is to make a form based on Tbl_Material Request and enter Material ID into box. When I enter Material ID other information should filled automatically.

Is there any other way to do this except making a combo box and selecting record from 500 entries. I am attaching my database. Any help is appriciated.

Secondly, when I create combo box I can't find wizard for that.
 

Attachments

You realize you can just type into a combo, you don't have to scroll and select?
 

Users who are viewing this thread

Back
Top Bottom