I have a form that links to another via a field. Both forms are views of tables. The tables have a common field (hostname). I want the button that moves from the master form to the child form to be greyed out when there are no records in the Child table. I know I do this using VB Code attached to the On Current Property of the Main Form. I also know I need to use Me!ButtonCommand.Enabled = False.<br>But I can't seem to work out how to Embed the SQL.<br>It should look like this:-<br><br>On Current - Run a select count(*) from Child_table where hostname = [current_hostname];<br>If the result of this = 0 then Me!ButtonCommand.Enabled = False. Otherwise it is True.<br><br>I can't quite figure out the VB and embedded SQL I need for this - can anyone help with this ??